Demo entry 6628730

oc

   

Submitted by anonymous on Jul 05, 2017 at 11:27
Language: Objective-C. Code size: 834 Bytes.

#pragma mark -notification
-(void)actionWithShortcutItem:(NSNotification *)notification
{
    NSString *type = notification.userInfo[@"type"];
    if(type!=nil)
    {
        
        
        //todo some viewcontroller transition
        if([type isEqualToString:@"openHome"])
        {
            tabBar.selectedItem = [tabBar.items objectAtIndex:0];
            
        }
        if([type isEqualToString:@"openPush"])
        {
            tabBar.selectedItem = [tabBar.items objectAtIndex:1];
        }
        if([type isEqualToString:@"openScanner"])
        {
           tabBar.selectedItem = [tabBar.items objectAtIndex:3];
        }
        if([type isEqualToString:@"openSearch"])
        {
            tabBar.selectedItem = [tabBar.items objectAtIndex:4];
        }
        
        
    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).