摘要:UIView *view5 = [[UIView alloc] initWithFrame:CGRectMake(80, 280, 30, 30)]; view5.backgroundColor = [UIColor redColor]; view5.backgroundC...
阅读全文
随笔分类 - iOS学习之路
摘要:Appdelegate中- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindo...
阅读全文
摘要:#import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController- (void)viewDidLoad { [super viewDidLoad]; /...
阅读全文
摘要:#import "RootViewController.h"#define kScreenWidth [UIScreen mainScreen].bounds.size.width#define kScreenHeight [UIScreen mainScreen].bounds.size.heig...
阅读全文
摘要:#import "RootViewController.h"#import "SecondViewController.h"#define kScreenWidth [UIScreen mainScreen].bounds.size.width#define kScreenHeight [UIScr...
阅读全文
摘要:NSArray *arrayText = @[@"用户名",@"密码",@"确认密码",@"手机号",@"邮箱"]; NSArray *placeholders = @[@"请输入用户名",@"请输入密码",@"请确认密码",@"请输入手机号",@"请输入邮箱"]; NSIn...
阅读全文
摘要:#import "RootViewController.h"#import "UIColor+MyUIColor.h"@interface RootViewController ()@end@implementation RootViewController/* UITapGestureRecogn...
阅读全文
摘要:#import "ViewController.h"//纯手工打造@interface ViewController ()@property (weak, nonatomic) UIButton *leftUpBtn;@property (weak, nonatomic) UIButton *r...
阅读全文
摘要:#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;- (IBAction)drink;- (IBAction)tou;@e...
阅读全文
摘要://这里的string是常量区没有引用计数 /* NSString 类下有许多类触,每个类触有不同的功能,比如:[NSString stringWithFormat:@"lanou"]当@"lanou"小于某个长度时是存在常量区,返回整数...
阅读全文
摘要:#import #import "Person.h"int main(int argc, const char * argv[]) {// @autoreleasepool {// // Person *p = [[Person alloc] initWithNam...
阅读全文
摘要:#import int codeLineCount(NSString *path){ //1.获得文件管理者 NSFileManager *mgr = [NSFileManager defaultManager]; //判断path是文件夹还是文件路径 BOOL dir ...
阅读全文
摘要:main.mStudent *stu = [Student studentWithName:@"xiaomin" gender:@"man" age:118]; [stu study]; [stu playGame];NSString+SayHi.h@interface ...
阅读全文
摘要:struct student{ char name[20]; char gender;};typedef struct student Student;int main(int argc, const char * argv[]) { @autoreleasepool { ...
阅读全文
摘要:main.m // NSArray *array =@[@"aa",@"ee",@"jj",@"mm",@"ss",@"kk"];// NSLog(@"%@",array);// NSArray *sortArray = [array sortedArrayUsingSelecto...
阅读全文
摘要:// @autoreleasepool { /* API: Inherits from 继承自 Conforms to 遵守什么协议 Framework 属于哪个框架 Availability 什么时候可以用 ...
阅读全文
摘要:@autoreleasepool { /* //创建NSDate 对象,创建的NSDate 对象是零时区的时间 NSDate *currentDate = [NSDate date]; NSLog(@"%@",...
阅读全文
摘要:main.m Person *p = [[Person alloc] init]; [p setName:@"doubi"]; [p setGender:@"man"]; [p setAge:23]; //点语法: //对象.属性名 ...
阅读全文
摘要:main.mMan *laowang = [Man manWithName:@"haohao" gender:@"男" age:0]; laowang.age = 20; Woman *sister = [W...
阅读全文
摘要:#import #import @interface Point2D : NSObject{ double _x; // x值 double _y; // y值}// x值的getter和setter- (void)setX:(double)x;- (double)x;// y值的get...
阅读全文

浙公网安备 33010602011771号