Time of Update: 2015-07-24
iOS 倒計時NSTimer項目中可能會遇到有些倒計時的地方比如 手機驗證的時候,驗證碼一般都會有一個時間限制,此時在輸入驗證碼的地方就需要展示一個倒計時 具體實現方式是使用了iOS 內建的 NSTimer 上代碼首先建立 int secondsCountDown; //倒計時總時間長度 NSTimer *countDownTimer; UILabel *labelText; 然後具體實現 //
Time of Update: 2015-07-24
Objective-C知識總結(1),objective-c知識總結Objective-C簡稱OC,是一款可以開發Mac OS
Time of Update: 2015-07-23
記憶體分區,c記憶體分區記憶體有五大地區從高地址到低地址分別為:棧、堆、BBS段、資料區段、程式碼片段提示:棧和堆是運行時分配,BBS段、資料區段、程式碼片段是編譯器分配BBS段:通常是指用來存放程式中未初始化的全域變數和靜態變數資料區段:通常是指用來存放程式中已經初始化的全域變數和靜態變數、字串常量等程式碼片段:通常是指用來存放程式執行代碼的一塊記憶體地區堆:是用於存放進程運行中被動態分配的記憶體段(調用malloc函數,新分配的記憶體動態添加到堆上;調用free函數,釋放記憶體從堆中刪除)棧
Time of Update: 2015-07-23
iOS開發之-猜數遊戲的簡單改進//// main.m// 猜數#import #import Guess.hint main(int argc, const char * argv[]){ Guess * number = [[Guess alloc]init]; NSLog(@請輸入您所猜的數字); int guessNumber; int n = 5; int i = 0; NSLog(@您有5次機會); while (n--) {
Time of Update: 2015-07-24
iOS_POST_網路請求同步的 post 請求#pragma mark - 同步的 post 請求- (IBAction)POSTSynButtonDidClicked:(UIButton *)sender { // 1、拼接 baseUrlString NSString *baseUrlString = @http://ipad-bjwb.bjd.com.cn/DigitalPublication/publish/Handler/APINewsList.ashx; // 2
Time of Update: 2015-07-23
static 和 extern,staticexternstatic 和 extern 修飾局部變數static修飾局部變數: 作用:1)static定義的變數的範圍會得到延長 2) static定義變數的語句只會被執行一次 extern不能夠修飾局部變數的void test (int num){ static int n = 0; printf("%d",n);
Time of Update: 2015-07-23
ios開發之-計算機的改進#import extern double add(double x,double y);extern double subtract(double x,double y);extern double multiply(double x,double y);extern double divide(double x,double y);#import #import MathOperation.hBOOL isAnOperator(const char value){
Time of Update: 2015-07-23
iOS_GET_網路請求同步的 get 請求#pragma mark - 同步的 get 請求- (IBAction)GETSynButtonDidClicked:(UIButton *)sender { // 1、網址裡面必須寫 http:// NSString *urlString =
Time of Update: 2015-07-23
GCD-block,adblock一,block的定義 //申明變數(void)(^PrintStr)(void);//定義PrintStr=^{ NSLog(@"PrintStr");};//調用PrintStr(); 二,修改block之外的變數 block程式塊中的變數不對程式塊外生效,可以加上_block讓其生效。 int a=0;void (^foo)(void)=^{ a=1;}//foo()
Time of Update: 2015-07-22
OC,中山oc @interface Car : NSObject{ @public int _wheels; int _speed;} - (void)run; @end @implementation Car - (void)run{ NSLog(@"%d個輪子, 速度為%d的車子跑起來了", _wheels,
Time of Update: 2015-07-22
iOS- Swift和Object-C的混合編程,ios-object-c1.前言 事實證明,在短時間內Swift還取代不了Object-C,而且....Apple Swift 開發小組的人說的:「We'll recommend people start with Swift, sure, but ObjC isn't going anywhere. Our goal's to work with the platform, not reinvent.」嗯,Apple 官方對
Time of Update: 2015-07-23
IOS - 設定與協助介面設定與協助修改頭像, 修改密碼, 移動客服, 協助, 聲明, 關於我們.代碼//// IndexSetting600ViewController.h// SymptomChecker//// Created by wang on 2015-7-21.////#import CYTableViewController.h@interface IndexSetting600ViewController : CYTableViewController@end////
Time of Update: 2015-07-22
iOS學習--網路基礎,ios--網路基礎Get & Post請求•網路訪問的四個步驟–地址–請求–串連–處理結果•iOS網路處理常用類–NSURL(地址)–NSRequest[GET]&
Time of Update: 2015-07-22
IOS開發之電子功能表的設計與實現(繼承、封裝、多態)//// main.m// 電子功能表//#import #import Food.h#import CoolFood.h#import HotFood.h#import MainFood.h#import Drinks.h#import BillBoard.hint main(int argc, const char * argv[]){ Food * food = [[Food alloc]init]; [
Time of Update: 2015-07-21
網頁 js,網頁jsJS與iOS之間的通訊,主要運用兩個方法:(PhoneGap架構也是基於此原理)1、UIWebView的 stringByEvaluatingJavaScriptFromString方法2、UIWebViewDelegate的- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
Time of Update: 2015-07-22
ios開發之電子優惠券的設計與實現//// main.m// 電子優惠券//#import #import Discount.h#import Food.hint main(int argc, const char * argv[]){ Discount * dis = [[Discount alloc]init]; [dis showInformation:20 andDiscountTime:@本優惠券每日上午10:30之後使用
Time of Update: 2015-07-21
iOS FMDB--UIImage的插入與讀取 1:先倒入FMDB 儲存圖片#import BaseViewController.h#import FMDatabase.h#import FMDatabaseQueue.h#import PPCamaraUtil.h#import SecondViewController.hstatic const NSString *kIdentifier=@BaseViewController;static const NSString
Time of Update: 2015-07-20
#ifndef#define#endif的用法,#ifndef#define#endif的用法 檔案中的#ifndef 頭件的中的#ifndef,這是一個很關鍵的東西。比如你有兩個C檔案,這兩個C檔案都include了同一個標頭檔。而編譯時間,這兩個C檔案要一同編譯成一個可運行檔案,於是問題來了,大量的聲明衝突。 還是把標頭檔的內容都放在#ifndef和#endif中吧。不管你的標頭檔會不會被多個檔案引用,你都要加上這個。一般格式是這樣的: #ifndef
Time of Update: 2015-07-20
高仿一元雲購IOS應用源碼項目,高仿ios高仿一元雲購IOS應用(高仿自一元雲購安卓用戶端)本App因官方沒有IOS用戶端故開發,利用業務時間曆時2個星期,終於開發完成,又因蘋果的各大審核規則對此App的影響,又曆時1個多月才終於成功上架,上架兩天,使用者量成功破千。But,因官方覺得咱涉及侵權,故鄙人從AppStore下架,故今日將此Ap分享給大家學習一下吧。因著作權問題,本次開源將不提供一元雲購的官方介面地址,地址都將以www.xxx.com替換,如果看官需要正常運行,請自行抓包獲得,見諒。
Time of Update: 2015-07-20
IOS NSNotification Center