添加self.automaticallyAdjustsScrollViewInsets = NO;凡是继承UIScrollView的控件都会受到UIViewController的这个automaticallyAdjustsScrollViewInsets属性的影响默认为YES当有navigation...
分类:
其他好文 时间:
2014-12-22 15:46:56
阅读次数:
191
头文件:@interface MyAlertViewViewController : UIViewController {}- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;-...
分类:
其他好文 时间:
2014-12-22 12:42:06
阅读次数:
121
UIViewController 的创建方式分为三种 // 第一种创建方式 直接创建// ZYWViewController *vc = [[ZYWViewController alloc] init];// vc.view.backgroundColor = [UIColor blueCol...
分类:
其他好文 时间:
2014-12-21 20:35:26
阅读次数:
181
错误1:1.1这种错误都是storyboard有问题解决:当前storyboard的Custom Class是MJViewController,代码中MJViewController继承自UITableViewController。而storyboard目前提供的是UIViewController,...
分类:
移动开发 时间:
2014-12-21 16:31:56
阅读次数:
169
-(UINavigationController*)cretateNavigationControllerWithClassName:(NSString*)className
{
ClassmyClassName=NSClassFromString(className);
UIViewController*vc=[[myClassNamealloc]init];
UINavigationController*nav=[[UINavigationControlleralloc]initWithRootVie..
分类:
其他好文 时间:
2014-12-18 19:00:51
阅读次数:
180
效果图:点击后的效果图:工程图:代码:viewController.h#import @interface ViewController : UIViewController{ UITableView *myTableView; NSMutableArray *dataArray; ...
分类:
其他好文 时间:
2014-12-18 10:14:11
阅读次数:
153
//获得设备型号+(NSString*)getCurrentDeviceModel:(UIViewController*)controller{intmib[2];size_tlen;char*machine;mib[0]=CTL_HW;mib[1]=HW_MACHINE;sysctl(mib,2,NULL,&len,NULL,0);machine=malloc(len);sysctl(mib,2,machine,&len,NULL,0);NSString*platform=[NS..
分类:
移动开发 时间:
2014-12-16 15:17:53
阅读次数:
131
#import #import "HMBannerView.h" @interface ViewController : UIViewController // Banner@property (nonatomic, strong) HMBannerView *bannerView; @end #....
分类:
其他好文 时间:
2014-12-16 15:01:03
阅读次数:
245
在项目开发中遇到下面几个问题:
1. 有些viewcontroller是中间界面(或者叫做过渡界面)是不能返回的
2. 有时候,想更新一下已经push到navigationController中的viewController。
3. 前两个结合的情况。...
分类:
其他好文 时间:
2014-12-14 18:38:07
阅读次数:
161
在iOS5.1 和 之前的版本中, 我们通常利用shouldAutorotateToInterfaceOrientation:来单独控制某个UIViewController的旋屏方向支持,比如:-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInte...
分类:
移动开发 时间:
2014-12-12 18:46:50
阅读次数:
138