原创 OC類 之 NSString
@property (readonly)NSUInteger length; // 字符串長度 @property (readonly,copy)NSString *uppercaseString;
原创 面對對象的三大特徵
// 兩個類 @interface BaseModel :NSObject @interface Person : BaseModel ###封裝 -----------------------------------------
原创 OC類 之 NSData NSDate NSSet NSNumber NSValue
NSValue: + (NSValue *)valueWithPointer:(constvoid *)pointer; NSNumber :NSValue(的子類) @property (
原创 幾個簡單的排序
// h文件 void swap(int *a, int *b); // 交換兩個數 void printArr(int *arr, int count); //
原创 UI類的擴展和觸碰
類目 #import <UIKit/UIKit.h> @interface UIButton (ZJQ_button) + (id)zjq_initWithFrame:(CGRect)frame t
原创 協議
1.聲明 2.設置代理人 // // Girl.h // OC_07類的擴展 // // Created by dllo on 15/7/24. // Copyright (c) 2015年 dllo. All rights re
原创 UIView UILabel UITextFiled UIButton UIControlView UIAlertView
##UIResponder - (BOOL)resignFirstResponder; ###UIView - (instancetype)initWithFrame:(CGRect)frame; 創建 backgroundColor
原创 UIScrollView, UIPageControl,UITableView
UIScrollView // 重要屬性,這個屬性可以讓scrollview滾動起來 // 滾動範圍 scrcollView.contentSize =CGSizeMake(WIDTH *6, HE
原创 省市區字典數組嵌套(UI版)
// AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOpt
原创 數據解析
#parser #import "ParserXML.h" @interface ParserXML()<NSXMLParserDelegate> // 用來臨時保存字符串內容 @property(nonatomic, c
原创 湯姆貓
#import "MainViewController.h" #import "UIButton+MyButton.h" @interface MainViewController () @property(nonatomic, ret
原创 UITableView
#UITableView 繼承 UIScrollView ##內容 ###有兩個協議 1. 內容 @property (nonatomic, assign) id <UITableViewDataSource> dataSou
原创 OC類 之 數組
@property (readonly)NSUInteger count; // 長度 @property (nonatomic,readonly)id firstObject;
原创 OC類之 Dictionary
@property (readonly) NSUInteger count; // 鍵值對數 NSDictionary : - (NSArray *)allKeysForObject:(id)
原创 內存管理與copy和mutableCopy
#import <Foundation/Foundation.h> #import "Student.h" int main(int argc,constchar * argv[]) { NSString *str =@"