作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我希望在 UIPopoverController
中实现相同的框架平滑扩展行为,当您更改它的 UIView
大小时,但使用 WEPopoverController .目前尚未实现。
UIPopoverController
中的属性 contentSizeForViewInPopover
发生变化时是否会触发某些东西?
最佳答案
尝试在您的类(class)中添加以下行。
[aView addObserver:self forKeyPath:@"frame" options:0 context:NULL];
并实现下面的方法。每次 View 的框架发生变化时都会调用它。
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if([keyPath isEqualToString:@"frame"]) {
//Your code here
}
}
不要忘记在不需要时移除观察者。
[aView removeObserver:self forKeyPath:@"frame"];
关于iphone - 挂接到 UIPopoverDelegate 方法以调整弹出窗口的大小 : contentSizeForViewInPopover,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9981337/
我有一个 UISplitViewController 子类,它实现了 UISplitViewControllerDelegate 和 UIPopoverController 委托(delegate)
我希望在 UIPopoverController 中实现相同的框架平滑扩展行为,当您更改它的 UIView 大小时,但使用 WEPopoverController .目前尚未实现。 UIPopover
我是一名优秀的程序员,十分优秀!