
UI
weichentai
这个作者很懒,什么都没留下…
展开
-
UIButton以及UITextField
对UILabel中所描述的程序运行流程以及代理人delegate方面的内容(ApplicationMain函数 UIApplicationDelegate)的一次练习#import "AppDelegate.h"@interface AppDelegate ()@property(nonatomic, retain)UITextField *textField;@property(nonatomic原创 2015-08-08 19:22:44 · 295 阅读 · 0 评论 -
UILabel
#import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (void)dealloc { // 对应属性里边那个strong(retain) [_window release]; [super dealloc]; }- (BOOL)application:(UIApplic原创 2015-08-05 21:30:38 · 306 阅读 · 0 评论 -
UINavigationController及界面传值
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; sel原创 2015-08-29 15:29:12 · 513 阅读 · 0 评论 -
UIScrollView+UIPageControl
#import "MainViewController.h" #define WIDTH self.view.frame.size.width #define HEIGHT self.view.frame.size.height @interface MainViewController ()<UIScrollViewDelegate>@end@implementation MainViewCont原创 2015-08-14 09:07:08 · 434 阅读 · 0 评论 -
UIImageView+GestureRecognizer
第五讲: 设计模式,手势识别器 本讲内容 一. Target/action设计模式 耦合: 耦合是衡量模块与模块之间关联程度的指标, 它是衡量一个程序写的好坏的标准之一 “高内聚,低耦合”是面向对象编程的核心思想// 试想 系统点击方法touches实现点击事件的劣(lie, 四声)势 每个视图的点击事件都不一样,如何处理? 我们无法预先知道这个视图点原创 2015-08-12 21:58:27 · 456 阅读 · 0 评论 -
UIControl和它的子类
UIControl的核心功能: 为控制控件通过addTarget:action:forControlEvents: 方法来添加事件; 通过remove:…来移除事件#import "MainViewController.h" #import <AVFoundation/AVFoundation.h>// (1).引用处理音频的系统文件 @interface MainViewController ()原创 2015-08-13 20:02:47 · 454 阅读 · 0 评论 -
UIView详解
#import "AppDelegate.h"// 宏 #define WIDTH self.window.frame.size.width #define HEIGHT self.window.frame.size.height // 通过改变视图中心点center的位置可以改变视图的位置 // center.x = frame.origin.x + frame.size.width/2; //原创 2015-08-05 20:37:39 · 422 阅读 · 0 评论 -
UITouch 摇晃手势启动器
视图控制器#import "MainViewController.h" #import "MyView.h" @interface MainViewController ()@property(nonatomic, retain)UITextField *myTextField;@end@implementation MainViewController- (void)dealloc { [原创 2015-08-12 20:17:29 · 325 阅读 · 0 评论 -
UI_Delegate
#import <UIKit/UIKit.h>// 1.声明一份协议 @protocol MyButtonDelegate <NSObject>//- (void)addTarget:(id)target action:(SEL)action;- (void)changeColor;@end@interface MyButton : UIView// 2.设置代理人的属性 @property(non原创 2015-08-12 20:30:51 · 269 阅读 · 0 评论 -
UI_Target-Action
通过UIView来模拟一个button的点击#import <UIKit/UIKit.h>@interface MyButton : UIView// 通过MyButton实现button的点击效果 // 1.通过自定义的方法,把目标和动作传到类的内部 - (void)addNewTarget:(id)target Action:(SEL)action; // target目标,button执行哪一原创 2015-08-12 20:23:42 · 267 阅读 · 0 评论 -
UIViewController
UIViewController:视图控制器 作用: 1.控制视图显⽰示,响应事件 2.分担AppDelegate的工作 3.实现模块独立,提高复用性 功能: 1.控制视图大小变换、布局视图、响应事件。 2.检测以及处理内存警告。 3.检测以及处理屏幕旋转。 4.检测视图的切换MVC概述 UIViewController是MVC设计模式的核心。 MVC是一个框架级的设计模式。原创 2015-08-08 20:11:04 · 512 阅读 · 0 评论 -
UIButton
#import "AppDelegate.h"@interface AppDelegate ()@property(nonatomic, assign)BOOL isSelected;@property(nonatomic, assign)BOOL isClick;@end@implementation AppDelegate- (void)dealloc { [_window releas原创 2015-08-08 16:04:30 · 413 阅读 · 0 评论 -
UITextField
#import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (void)dealloc { [_window release]; [super dealloc]; }- (BOOL)application:(UIApplication *)application didFinishL原创 2015-08-08 15:12:11 · 359 阅读 · 0 评论 -
自定义视图
实现一个功能,不是难事。写出高质量的代码却不是任何程序员都能做到的事。高质量代码特点:可复用,可移植,精炼等自定义视图:系统标准UI之外,⼰己组合而出的新的视图。 iOS提供了很多UI组件,借助它们,我们可以做各种程序。 尽管如此,实际开发中,我们还需自定义视图.积累自己的代码库.方便开发.自己封装的视图,能像系统UI控件一样,用于别的项目中,能大大降低开发成本,提高开发效率自定义视图步骤 根原创 2015-08-08 19:02:00 · 435 阅读 · 0 评论