iOS开发一些零碎的知识点(一)
一、导航栏的创建
UIViewController* firstCon = [[UIViewControlleralloc]init];
NavigationController* nav = [[NavigationControlleralloc]initWithRootViewController:
firstCon];//指定导航控制器的根视图控制器
nav.modalPresentationStyle =UIModalPresentationFormSheet;//呈现出模态效果
二、下拉菜单的创建
UIViewController* pvc = [[UIViewControlleralloc]init];
UIPopoverController* pop = [[UIPopoverControlleralloc]initWithContentViewController:
pvc];//创建下拉菜单
[pop presentPopoverFromBarButtonItem:firstItem permittedArrowDirections:
UIPopoverArrowDirectionAny animated:YES];//展示出来