UIPopoverController按件,只有在ipad中才可以使用。
代码如下:
- (void)viewDidLoad
{
[super viewDidLoad];
//列表
PopTableController *table=[[PopTableController alloc] init];
//设置展示的区域大小
table.contentSizeForViewInPopover=CGSizeMake(200, 300);
//实例化UIPopoverController
popoverController= [[UIPopoverController alloc] initWithContentViewController:table];
//使用点击按钮
list =[[[UIBarButtonItem alloc] initWithTitle:@"列表" style:UIBarButtonItemStyleBordered target:self action:@selector(list:)] autorelease];
//将按钮添加到toolbar上
[toolbar setItems:[NSArray arrayWithObject:list]];
}
//按钮的事件
-(void)list:(id)sender
{
// presentPopoverFromBarButtonItem:list 剪头指向list这个按钮
[popoverController presentPopoverFromBarButtonItem:list permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
//隐藏
-(void)missView
{
//隐藏视图
[popoverController dismissPopoverAnimated:YES];
}
- 大小: 30 KB
分享到:
相关推荐
UIPopoverController ios iphone 实例 用法
运行时实现,以允许在iPhone应用程序上使用UIPopoverController 。 执行 默认情况下,弹出窗口仅适用于iPad应用程序。 这是UIPopoverController类的类别,该类重写UIPopoverController的标准实现,以使_...
来源:Licence:Custom作者:小江_ 自定义箭头弹出窗口,代码简单,逻辑清晰,支持block回调。 小编注:感谢开发者@小江_ 。
在iPhone上也能使用UIPopoverController。这个代码库不但让UIPopoverController的使用 变得简单,同时也能在iPhone上使用UIPopoverController。点击任意控件,如按钮、导航条按钮、工具条按钮等,都会弹出视图。弹出...
是iPad开发中常见的一种控制器(在iPhone上不允许使用) 跟其他控制器不一样的是,它直接继承自NSObject,并非继承自UIViewController 它只占用部分屏幕空间来呈现信息,而且显示在屏幕的最前面 2.使用步骤 要想...
WEPopover:适用于iOS的通用popover实施,具有与iPad的UIPopoverController相同的API,但可通过自定义背景进行配置,也可用于iPhone
在iPhone上实现iPad上UIPopoverController的效果,也就是,点击选中列表某一行,将弹出另外一个小列表,显示更多的内容。 注意:请在Mac下解压使用
在iPhone上也能使用UIPopoverController。这个代码库不但让UIPopoverController的使用变得简单,同时也能在iPhone上使用UIPopoverController。点击任意控件,如按钮、导航条按钮、工具条按钮等,都会弹出视图。弹出...
iPad-friendly interfaces, including UIPopoverController and UISplitViewController Blocks and Categories Instruments and Xcode’s static analyzer UIWebView and connecting with web servers Push ...
Generic popover implementation for iOS with same API as the UIPopoverController for the iPad, but configurable with custom background and available for iPhone as well.
仿照iPad上UIPopoverController系统类实现的弹出视图, 可以在iPhone上使用 github: https://github.com/luomoyj/YJPopoverDemo 欢迎star
该源码是一个自定义箭头弹出窗口的案例功能的,源码UIPopovercontroller iphone, 自定义箭头弹出窗口,代码简单,逻辑清晰,支持block回调。
现在,以下内容更为准确: iPhone / iPod的ActionSheetPicker = ActionSheetPicker =选取器+ UIActionSheet iPad ActionSheetPicker =选取器+ UIPopoverController总览用PickerView轻松呈现一个ActionSheet,允许...
Get a rapid introduction to iPhone, iPad, and iPod touch programming. With this easy-to-follow guide, you’ll learn the steps necessary for developing your first marketable iOS application, from ...
不知道大家发现了没,在现在的很多App中常使用圆角...iPad 中有 UIPopoverController 类供开发使用, iPhone中就需要开发人员定制了。那么下面这篇文中就来聊聊定制圆角箭头矩形提示框,有需要的朋友们可以参考借鉴。