IOS 學習筆記 2015-04-03 OC-API-檔案讀寫,2015-04-03oc-api-//// WPFileHelper.m// OC-API-檔案操作//// Created by wangtouwang on 15/4/3.// Copyright (c) 2015年 wangtouwang. All rights reserved.//#import "WPFileHelper.h"@implementation WPFileHelper+(NSString
Objective-C資料類型、資料類型轉換,objective-c資料類型資料類型1.Objective-C資料類型可以分為:基礎資料型別 (Elementary Data Type)、對象資料類型和id類型。2.基礎資料型別 (Elementary Data Type)有:int、float、double和char類型。3.物件類型就是類或協議所聲明的指標類型,例如: NSAutoreleasePool *pool
iOS常見演算法(二分法 冒泡 選擇)二分法: 平均時間複雜度:O(log2n) int halfFuntion(int a[], int length, int number) { int start = 0; int end = length - 1; int index = 0; while(start < end) { index = start + (end - start)/2 if(a[index] == number){ return index; } else if(a[
NSString+Check, iOS 判斷手機號碼格式是否正確使用方法:建立一個繼承於NSString的類,再匯入NSString+Check.h標頭檔,通過判斷字串的屬性值(checkPhoneNumInput)YES or NO 即可。// NSString+Check.h// ics//// Created by Casystar on 15-4-2.// Copyright (c) 2015年 dong. All rights reserved.// #import
iOS 擷取目前時間並且顯示走在視圖上//// RootViewController.m// 時間戳記在走並且顯示Demo//// Created by Dubai on 15/4/2.// Copyright (c) 2015年 Dubai. All rights reserved.// #import "RootViewController.h" @interface RootViewController (){ UILabel