码迷,mamicode.com
首页 >  
搜索关键字:viewcontroller    ( 2658个结果
ios swift tableview
import UIKitclass ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {@IBOutlet var myTable: UITableView?var typeArray:NSArr...
分类:移动开发   时间:2014-09-26 23:02:38    阅读次数:239
iOS绘图例2:增加Undo/Redo功能
1. 在工程中添加Undo、Redo的按钮图片,每个按钮都有可用和不可用两种状态图片,共4个图片。 2. 在StoryBoard中添加两个按钮,设置图片属性和自动布局约束。 3. 按住 Ctrl 拖动按钮到 ViewController.mm 中,创建...
分类:移动开发   时间:2014-09-26 13:15:29    阅读次数:308
布尔类型-2.0
// //??ViewController.m //??OC-Design // //??Created?by?葛迅?on?14/9/25. // // #import?"ViewController.h" @interface?ViewController?() @end @implementation?ViewController -?(vo...
分类:其他好文   时间:2014-09-25 23:50:18    阅读次数:289
iOS 在应用中播放本地视频文件
可以使用MPMoviePlayerController来播放本地视频文件 1.添加 Mediaplayer framework 并且在viewcontroller中#import   2. 把视频文件拖拽到xcode中 3. 获取文件存放的路径 NSString*thePath=[[NSBundle mainBundle] pathForResource:@"yourVideo" of...
分类:移动开发   时间:2014-09-25 22:41:38    阅读次数:440
UICollectionView的使用方法及demo
直接上代码,说明请看注释吧 ViewController.h #import @interface ViewController : UIViewController{ } @property (strong, nonatomic)UICollectionView *collectionView; @end ViewController.m #import "ViewControl...
分类:其他好文   时间:2014-09-25 16:13:19    阅读次数:222
IOS 状态栏 保持黑底白字 方法
plist里UIViewControllerBasedStatusBarAppearance设置为NO;KEY:Viewcontroller-basedstatusbarappearanceType:BooleanValue:NO在appdelegate.m中添加if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=7){[applicationsetStatusBarStyle:UIStatusBarStyleLightCont..
分类:移动开发   时间:2014-09-24 18:31:58    阅读次数:225
去除Xcode6创建工程时自带的storyboard
去除Xcode6创建工程时自带的storyboard1. 删除storyboard文件,并在setting里面清空加载storyboard:2. 导入ViewController到appDelegate文件中此处复制粘贴的代码如下: self.window = [[UIWindow alloc] i...
分类:其他好文   时间:2014-09-23 23:09:45    阅读次数:266
iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon
在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView在以前,一个UIViewController的View可能有很多小的子view。这些子view很多时候被盖在最后,我们在最外层ViewController的viewDidLoad方法中,用addSubview...
分类:移动开发   时间:2014-09-23 18:33:35    阅读次数:152
黑马程序员-6.UITableView
相比于其他的View,UITableView算是用的很广的一个,和UITableView配合使用的是Cell,在程序中可以自定Cell,包括内容样式等UITableView需要一个数据源(dataSource)<UITableViewDataSource>在ViewController中声明做tableView的时候,需要让控制器充当代理的角色在控制..
分类:其他好文   时间:2014-09-22 11:52:53    阅读次数:230
ios swift Button, Label, AlertView
import UIKitclass ViewController: UIViewController , UIAlertViewDelegate {@IBOutlet var label: UILabel?@IBOutlet var btn: UIButton?@IBAction func btnC...
分类:移动开发   时间:2014-09-21 21:15:51    阅读次数:263
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!