大佬教程收集整理的这篇文章主要介绍了iOS splitviewer controller,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
The split view is something very cool within the new iPhone OS 3.2. It allows us to visualize a master-detail view in a very simple mAnner. Combined with iPads’ big display of 1024×748 pixels it will be possible to create even better,more user-friendly and valuable applications.
Basically,the split view consists of two separate views. The master view will be shown in a 320 pixel width part on your screen if your iPad is at landscape orientation,otherwise the master view will be accessible as a popover view. The details view should show your main content and will be at full size if your iPad is at porTrait orientation. Mainly the user will be focused at your details view and this fact you should keep in mind.
CreaTing a split view pragmatically within your application is a easy task. The following code will show this:
//adjust detail view f = detail.view.frame; f.size.width = 830; f.size.height 1024; f.origin.x 320; f.origin.y 0; [detail.view setFrame:f];
_hidesmasterViewInPorTrait = (hidden) ? 0 : 1;
,as suggested in one of the comments in the above blog,but nothing worked.here is the way it works
[splitViewController setHidesmasterViewInPorTrait:NO];
//[self.splitViewController setHidesmasterViewInPorTrait:NO]; //这个在iOS SDKbase 5.1 的情况下似乎也是不 work的。so find normal support way,走正道才是王道啊
_displayeditems
is a private ivar,so you shouldn't access it,even from a category.
That said,you should try compiling the same code with
gcc -arch i386
and
arch x86_64
and see the difference. In the 32 bit mode you don't see the error. This shows how fragile the situation is. You really shouldn't.
That said,there's a way to get that ivar by abusing KVC:
@implementation NSCollectionView (displayeditems)(NSMutableArray*)@H_827_126@myDisplayeditems { returnself valueForKey:@"displayeditems"];} @end
Note that you shouldn't name your method just as displayeditems
. That would make an infinite loop,because the KVC machinery would find your method earlier than the ivar.
以上是大佬教程为你收集整理的iOS splitviewer controller全部内容,希望文章能够帮你解决iOS splitviewer controller所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。