Time of Update: 2015-07-31
Objective-C知識總結(3),objective-c知識總結手動記憶體管理MRC首先介紹一下引用計數器:用來儲存當前對象有幾個東西在使用它(數字)引用計數器的作用:用來判斷對象是否應該回收記憶體空間(如果對象不等於nil,當引用計數器為0,此時要回收對象的記憶體空間)引用計數器的操作:retain 使得引用計數器+1release 使的引用計數器-1retainCount
Time of Update: 2015-07-31
iOS Human Interface
Time of Update: 2015-07-31
UIWindow-WindowLevel,windowlevelWindowLevel是UIWindow的一個屬性。系統定義的一共有3種。UIKIT_EXTERN const UIWindowLevel UIWindowLevelNormal;UIKIT_EXTERN const UIWindowLevel UIWindowLevelAlert;UIKIT_EXTERN const UIWindowLevel UIWindowLevelStatusBar; 代碼: -
Time of Update: 2015-07-31
UIWindow-密碼框,uiwindow-密碼一,工程結構,如所示: 二,代碼PasswordInputWindow.h #import <UIKit/UIKit.h>@interface PasswordInputWindow : UIWindow+(PasswordInputWindow *)shareInstance;-(void)show;@end PasswordInputWindow.m #import
Time of Update: 2015-07-31
iOS階段學習第26天筆記(UILabel的介紹),第26天uilabeliOS學習(UI)知識點整理一、關於UILabel的使用介紹1)概念:UILabel是一個繼承自UIView的用於展示文本資訊的控制項2)UI中所有的控制項都繼承自UIView 即UIView 是UI的祖宗類。3)UILable的執行個體化方式 代碼: 1 UILabel *label=[[UILabel alloc]init]; //初始化UILabel 2
Time of Update: 2015-07-31
Xcode開發工具問題,xcode開發工具 昨天開啟Xcode 發現滑鼠游標變成了黑色的塊狀,不能編輯內容了,且Content地區還多出了一個顯示檔案路徑的框框 如: 然後自己百度,到論壇提問、到QQ群裡問;卸載重裝Xcode、重裝系統各種折騰都沒解決這個問題,糾結了我一天
Time of Update: 2015-07-31
Apple Watch的課表應用iOS源碼項目,課表ios 源碼Class-Timetable,小清新風格的課表應用,可以按周或按天顯示課表。按天顯示時,左右滑動螢幕可以查看前一天或後一天的課表。功能:可以雙模式切換(按天顯示,按周顯示,可以和 Apple Watch 搭配使用。運行環境iOS 7.0 Xcode 6源碼下載:http://code.662p.com/view/10721.html<ignore_js_op> <ignore_js_
Time of Update: 2015-07-31
iOS 單例模式 (設計模式一)單例模式是一種常用的軟體設計模式。在它的核心結構中只包含一個被稱為單例類的特殊類。通過單例模式可以保證系統中一個類只有一個執行個體而且該執行個體易於外界訪問,從而方便對執行個體個數的控制並節約系統資源。如果希望在系統中某個類的對象只能存在一個,單例模式是最好的解決方案。主要優點:提供了對唯一執行個體的受控訪問。 由於在系統記憶體中只存在一個對象,因此可以節約系統資源,對於一些需要頻繁建立和銷毀的對象單例模式無疑可以提高系統的效能。
Time of Update: 2015-07-31
iOS開發---輪播圖模組(普通版)// 用ScrollView實現圖片輪播// ViewController.m// Slider-輪播//// Created by JamesXiang on 15/7/21.// Copyright (c) 2015年 JamesXiang. All rights reserved.//#import ViewController.h@interface ViewController () @property (nonatomic,
Time of Update: 2015-07-31
iOS中單例的安全執行緒在多線程中,單例的實現也要考慮安全執行緒問題。1.通過GCD dispatch_once來實現: @property (nonatomic, strong) NSString *str; - (NSString *)str {static dispatch_once_t onceToken;dispatch_once(&onceToken, ^{if (!_str) {_str = [[NSString alloc] init];}
Time of Update: 2015-07-25
iphone開發的技巧一,修改狀態列:1.加入[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];但此方法只是不顯示狀態條,狀態條所佔用的空間仍然存在。2.可以修改Info.plist檔案,在info.plist檔案中加入一條新索引值,命名為:UIStatusBarHidden;選擇Valuetype為Boolean,而後重新編譯運行。3,修改螢幕顯示方向:[[UIApplication
Time of Update: 2015-07-25
iOS for迴圈建立button,button的寬度根據上面的文字來自適應.最近需要使用一個標籤頁,尋思自己寫一個demo.標籤的大小根據上面的文字來自適應大小,需要根據後台返回的資料自動換行.沒有添加NSArray *arr = @[@無知,@風雲變幻,@施耐庵,@唉,@西門吹雪,@呵呵噠,@快看看,@窿窿啦啦,@一杆禽獸狙,@合歡花,@暴走大事件,@非誠勿擾,@呵呵呵]; CGFloat w = 0;//儲存前一個button的寬以及前一個button距離螢幕邊緣的距離
Time of Update: 2015-07-24
iOS 倒計時NSTimer項目中可能會遇到有些倒計時的地方比如 手機驗證的時候,驗證碼一般都會有一個時間限制,此時在輸入驗證碼的地方就需要展示一個倒計時 具體實現方式是使用了iOS 內建的 NSTimer 上代碼首先建立 int secondsCountDown; //倒計時總時間長度 NSTimer *countDownTimer; UILabel *labelText; 然後具體實現 //
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
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
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////