第一个视图控制器: import UIKit // 遵循协议 class ViewController: UIViewController,SecondVCDelegate { override func viewDidLoad() { super.viewDidLoad() // 创建一个butt ...
分类:
编程语言 时间:
2016-05-13 23:28:09
阅读次数:
478
UIViewController绑定xib界面可视化,有两种方式: 1.第一种(自动化),在创建控制器时,勾选xib选项. 2.第二种手动创建一个Xib,然后再手动绑定到对应的控制器上 ...
分类:
其他好文 时间:
2016-05-13 19:02:27
阅读次数:
119
UIStoryboard *stryBoard=[UIStoryboard storyboardWithName:@"second" bundle:nil]; UIViewController *test=[stryBoard instantiateViewControllerWithIdentif ...
分类:
移动开发 时间:
2016-05-13 08:07:24
阅读次数:
158
直接上代码////MoveScaleImageController.h//MoveScaleImage////Createdbyon12-4-24.//Copyright(c)2012年__MyCompanyName__.Allrightsreserved.//#import<UIKit/UIKit.h>#import"MoveScaleImageView.h"@interfaceMoveScaleImageController:UIViewController<UIScroll..
分类:
移动开发 时间:
2016-05-13 05:17:33
阅读次数:
221
1、UIViewController 2、IBAction & IBOutlet 3、App开发步骤 4、关闭键盘 5、私有扩展 6、域名 & 反向域名 7、移动控件 8、魔法数字(View.tag)...
分类:
移动开发 时间:
2016-05-12 15:25:09
阅读次数:
177
当我们在Xcode中新建一个UIViewController子类的viewController 时候,Xcode会自动帮我们把一部分代码生成(viewDidLoad、didReceiveMemoryWarning方法等,以及注释)。今天,于是花了一点时间了研究了一下,并整理出一个简化模板拷贝以及修改TemplateInfo.plist 中后缀名的Shell 脚本工具。脚本脚本比较简单,就不详细解释了...
分类:
其他好文 时间:
2016-05-12 12:59:09
阅读次数:
174
我们直接来看完整的代码:
import UIKit
import SafariServices
class ViewController: UIViewController {
@IBAction func openWithSafariVC(sender: AnyObject) {
let sfsVC = SFSafariViewController(URL: NSUR...
分类:
移动开发 时间:
2016-05-12 12:53:15
阅读次数:
228
下载文件直接请求获取:
这种方式会将数据全部接收回来,然后一次性存储到文件中,会出现内存峰值问题,也没有进度跟进
//ViewController.h#import @interface ViewController : UIViewController@end
//ViewController.h#import "ViewController.h"@interface...
分类:
其他好文 时间:
2016-05-12 11:42:26
阅读次数:
196
每个应用程序的window对象都有且只有一个根控制器 每一个视图控制器都自带一个view ...
分类:
其他好文 时间:
2016-05-12 09:17:28
阅读次数:
153
MVC:是一种设计模式 M(model):存储数据 V(view) :展示数据 (UIView) C(controler):用来衔接MVC,作为M和V之间的桥梁,负责数据的处理和传递等等 (UIViewController) CGPoint:用来设置坐标; CGSize: 用来设置尺寸; CGRec ...
分类:
其他好文 时间:
2016-05-11 19:51:32
阅读次数:
220