摘要:
——————————————— main.m文件 #import <Foundation/Foundation.h> #import "Teacher.h" #import "Student.h" int main(int argc, const char * argv[]) { @autorele 阅读全文
摘要:
———————————————Person.h<设置代理类的声明文件> #import <UIKit/UIKit.h> //第一://1、引用类名@class Person;//2、定义一份代理协议@protocol personDelegate <NSObject>//3、声明代理方法@requi 阅读全文
摘要:
SingletonTool.h 文件 #import <Foundation/Foundation.h> //遵守NSCopying,NSMutableCopying协议 @interface SingletonTool : NSObject<NSCopying,NSMutableCopying> 阅读全文
摘要:
//声明对象 @property (nonatomic,strong) UIActivityIndicatorView *activityindicator; self.activityindicator = [[UIActivityIndicatorViewalloc] initWithFrame 阅读全文
摘要:
//将NSUserDefaults的实例化定义成宏 #define USER_DEFAULT [NSUserDefaults standardUserDefaults] /*NSUserDefaults是一个单例,适合存储轻量级的本地数据,一些简单的数据(NSString类型的)例如密码,网址等 在 阅读全文
摘要:
//声明对象 @property (nonatomic,strong) UISegmentedControl *segmentedcontrol; //标题 NSArray *segmentArry = [NSArray arrayWithObjects:@"中国",@"美国",@"大不列颠英国", 阅读全文
摘要:
//声明对象 @property (nonatomic,strong) UIAlertController *alertcontroller; //创建提示窗口 Title:标题 message:提示内容 Style:风格 self.alertcontroller = [UIAlertControl 阅读全文
摘要:
//声明对象 @property (nonatomic,strong) UIProgressView *progressview; self.progressview = [[UIProgressView alloc] init]; //设置属性 self.progressview.backgrou 阅读全文
摘要:
//声明对象 @property (nonatomic,strong) UISlider *slider; self.slider = [[UISlider alloc] init]; //设置属性 self.slider.backgroundColor = [UIColor grayColor]; 阅读全文
摘要:
//声明对象 @property (nonatomic,strong) UISwitch *switchX; self.switchX = [[UISwitchalloc] init]; self.switchX.frame = CGRectMake(self.view.frame.size.wid 阅读全文