1.ViewController的生命周期
按结构可以对iOS的所有ViewController分成两类:
1、主要用于展示内容的ViewController,这种ViewController主要用于为用户展示内容,并与用户交互,如UITableViewController,UIViewController。
2、用于控制和显示其他ViewController的ViewControl...
分类:
移动开发 时间:
2016-07-21 13:03:20
阅读次数:
236
警告对话框UIAlertView和等待提示器UIActivityIndicatorView:
1.UIAlertView简单一点就是弹框
2.就是所谓的菊花转圈圈
声明:注意@interface ViewController : UIViewController这个里面多了一个UIAlertViewDelegate代理
#import <UIKit/U...
分类:
移动开发 时间:
2016-07-21 12:55:04
阅读次数:
171
ViewController *rootVC = (ViewController *)self.presentingViewController; while (rootVC.presentingViewController) { rootVC = (ViewController *)rootVC. ...
分类:
其他好文 时间:
2016-07-20 19:25:25
阅读次数:
151
import UIKit class ViewController: UIViewController,ZYQAssetPickerControllerDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate{ v ...
分类:
其他好文 时间:
2016-07-20 17:38:08
阅读次数:
124
iOS中如果不自定义UINavigationBar,通过手势向右滑是可以实现返回的,这时左边的标题文字提示的是上一个ViewController的标题,如果需要把文字改为简约风格,例如弄过箭头返回啥的,那么你需要自定义UINavigationBar,但当你自定义navigationBar后,这个功能 ...
分类:
移动开发 时间:
2016-07-19 22:05:27
阅读次数:
797
开关按钮UISwitch
在ViewController.h里面
#import @interface ViewController : UIViewController{ //定义一个开关控件
//作用可以进行状态的改变
//开,关:两种状态可以切换
//所有UIKit框架库中的控件均已UI开头
//苹果官方的控件都定义在UIK...
分类:
移动开发 时间:
2016-07-19 13:46:24
阅读次数:
180
UIViewController使用:
ViewController.m里面的代码:#import "ViewController.h"
#import "ViewController02.h"
@interface ViewController ()@end@implementation ViewController//当屏幕被点击时,调用此函数
- (void) touchesBegan:(N...
分类:
移动开发 时间:
2016-07-19 11:13:39
阅读次数:
177
定时器UITimer和视图对象移动
在ViewController.h#import @interface ViewController : UIViewController{
//定义一个定时器对象
//可以在每隔固定的时间发送一个消息
//通过消息来调用相应的事件函数
//通过此函数可在固定时间段来完成一个根据时间间隔的任务...
分类:
移动开发 时间:
2016-07-19 10:12:05
阅读次数:
213
import UIKit class ViewController: UITableViewController { } 或参照下面代码 import UIKit class MineCenterCell: UITableViewCell { } func tableView(tableView: ...
分类:
编程语言 时间:
2016-07-13 22:30:05
阅读次数:
223
#import "ViewController.h"
#import "WZYApp.h"
@interface ViewController ()
// 数据模型数组
@property (nonatomic, strong) NSArray *apps;
// 保存操作对象的字典
@property (nonatomic, strong) NSMutableDictionary *oper...
分类:
移动开发 时间:
2016-07-13 16:31:52
阅读次数:
254