lundi 1 août 2016
How to call a UIViewController from a UIView SubClass?
I have main UIViewController in which I have an UITableView.
In the cell of UItableView I had already add an UICollectionView.
in -
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
I am calling an method of main UIViewController.
UIViewController *view = [[UIViewController alloc] init];
[view my_method];
in main view.
-(void)my_method {
AnotherName *view_my=[[AnotherName alloc]initWithNibName:@"AnotherName" bundle:nil];
[self.navigationController pushViewController:view_my animated:NO];
}
Viewdidload method is calling but view is not showing.
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire