随笔分类 - iOS开发笔记
摘要:在界面上实现一个UIPickerView:1、新建一个 singleViewApplication,在 xxxViewController.m文件中:1 @interface moboViewController () 2 @property (nonatomic, strong) UIPicker...
阅读全文
摘要:前言上一篇博文,我们介绍了一下如何实现 UISwitch ,我们这次介绍下如何自定义 UISwitch。原文连接:http://www.cnblogs.com/LeoYoung/p/qq907596253.html正文1、我们先在界面上实现一个 UISwitch。 a>在 控制器.m 文件中,添加...
阅读全文
摘要:1、首先我们先创建一个 SingleView application。2、我们可以用Inface Builder 来实现,也可以通过手码来实现。我们这次先通过手码来实现:首先,我们在 xxxViewController.m文件中,为self添加一个UISwitch类型的成员变量,我们叫TA main...
阅读全文
摘要:首先我们知道,UIAlertView实际上有多种样式,在xcode中,按住cmd点击UIAlertView,进入头文件我们看到:1 typedef NS_ENUM(NSInteger, UIAlertViewStyle) {2 UIAlertViewStyleDefault = 0, //默...
阅读全文
摘要:1、在viewController的.m文件,遵守代理协议@interface moboViewController () 2、在- (void)viewDidLoad 方法中实现UIAlertView 1 - (void)viewDidLoad 2 { 3 [super viewDidLo...
阅读全文
摘要:Bundle name- is folder name, where your app (including executable file and all resources) will be stored (Cool Program.app)。建议不要修改bundle nameBundle display name- is what will be shown on iPhone screen,即当你安装该app到iPhone上显示的name,一般新建项目的时候改为中文。
阅读全文
摘要:iOS6中的 sizeWithFont 方法 在iOS7中已经被deprecated了!取而代之的方法是boundingRectWithSize 方法, 具体使用如下://根据要显示的text计算label高度- (CGFloat)contentCellHeightWithText:(NSString*)text{NSIntegerch;UIFont*font = [UIFont fontWithName:@"Arial"size:11];//11一定要跟label的显示字体大小一致//设置字体CGSizesize =CGSizeMake(300,20000.0f);//注
阅读全文

浙公网安备 33010602011771号