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