Created
June 18, 2013 16:50
-
-
Save vanbungkring/5807132 to your computer and use it in GitHub Desktop.
example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)setCenter:(NSNotification *)notification{ | |
NSMutableArray *dict = (NSMutableArray*)notification.object; | |
if([[dict objectAtIndex:0] isEqualToString:@"play-list"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevViewController alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevServiceController"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevServiceController alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevHistoryController"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevHistoryController alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"downloadQueueViewController"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[downloadQueueViewController alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevPlayList"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevPlayList alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevAllSong"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevAllSong alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"topChartViewController"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[topChartViewController alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevViewController"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevViewController alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevVideoPlayer"]){ | |
self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevVideoPlayer alloc] init]]; | |
} | |
else if([[dict objectAtIndex:0] isEqualToString:@"mokletdevPlayerViewController"]){ | |
self.mainViewController.centerPanel =nil; | |
//self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevViewController alloc] init]]; | |
} | |
//self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[[dict objectAtIndex:0] alloc] init]]; | |
if(notification==nil){ | |
// self.mainViewController.centerPanel =nil; | |
self.mainViewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[mokletdevViewController alloc] init]]; | |
//[self performSelector:@selector(dismiss) withObject:nil afterDelay:2]; | |
} | |
} |
NSMutableArray *dataPass=[[NSMutableArray alloc]init];
if([sender isEqualToString:@"Service List"])
{
[dataPass addObject:@"mokletdevServiceController"];
[[NSNotificationCenter defaultCenter] postNotificationName:@"dealNotification" object:dataPass];
[self.sidePanelController showCenterPanel:YES];
[dataPass removeAllObjects];
[dataPass release];
NSLog(@"1");
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ini untuk manggil nya