iOS常见控件的创建方法import UIKitclassViewController: UIViewController { var myLabel: UILabel = UILabel() var myView: UIView = UIView() var myButton: UIBut...
分类:
编程语言 时间:
2015-03-06 19:04:07
阅读次数:
174
打开UIViewController.h
//
// RootViewController.h
// Lesson09TableView
//
// Created by Dubai on 14-9-26.
// Copyright (c) 2014年 Dubai All rights reserved.
//
#im...
分类:
移动开发 时间:
2015-03-05 10:55:53
阅读次数:
275
1. 什么是UIPopoverController?是iPad开发中常见的一种控制器(在iphone上不允许使用)跟其他控制器不一样的是,它直接继承自NSObject,并非继承自UIViewController它只占用部分屏幕空间来呈现信息,而且显示在屏幕的最前面2.怎么使用UIPopoverCon...
分类:
移动开发 时间:
2015-03-05 01:40:24
阅读次数:
185
一、中间传值全局变量1.存放中间值(放在Delegate--比较麻烦)@property(nonatomic,strong) NSString *labelText;2.保存值(放在应用程序对象里面)YYAppDelegate *appDelegate = [UIApplication shared...
分类:
其他好文 时间:
2015-03-04 14:23:25
阅读次数:
155
UIViewController的生命周期及iOS程序执行顺序分类:iOS开发2012-05-14 20:0720828人阅读评论(3)收藏举报iosuiviewhierarchyaccessorinterfaceapple当一个视图控制器被创建,并在屏幕上显示的时候。 代码的执行顺序1、 allo...
分类:
移动开发 时间:
2015-03-03 20:27:20
阅读次数:
175
1.创建并初始化创建UITextView的文件,并在.h文件中写入如下代码: #import @interface TextViewController : UIViewController { UITextView *textView; } @property (nonatomi...
分类:
其他好文 时间:
2015-03-03 16:27:44
阅读次数:
132
import?UIKit
class?ViewController:?UIViewController?{
????@IBOutlet?weak?var?display:?UILabel!
????
????var?userIsInputingDigit?:Bool??=?false
????@IBAction?func?a...
分类:
编程语言 时间:
2015-03-01 18:37:26
阅读次数:
180
前几话中我们搞定了布局,这一话我们首先要把引用全部加上,就是连线到控制器中
UIViewController {
@IBOutlet weak var textField1: UITextField!
@IBOutlet weak var web1: UIWebView!
然后就是代理,首先来看一下我们手机场景界面上的三个按钮:
第一个按钮是控制器本身,第二个按钮是...
分类:
编程语言 时间:
2015-02-28 20:22:17
阅读次数:
197
原型: - (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion 描述: Presents a view controller modally. ? In a horizon...
分类:
其他好文 时间:
2015-02-28 16:52:20
阅读次数:
146