Time of Update: 2016-01-03
解決項目中.a檔案的衝突,項目.a檔案衝突.a檔案是靜態檔案,有多個.o檔案組合而成的,在ios項目開發中,當引用第三方庫的時候,時不時的會碰到諸如庫衝突、庫包含了某些禁用的API等問題,而這些庫往往都被打包成了靜態庫檔案(即 .a檔案)來使用。這時就需要我們能夠去對Object file進行一些必要的處理調整。如檢索資訊,移除衝突的庫等。首先我們來瞭解下解決.a檔案的一些命令:一、 尋找.a檔案中是否包含相關資訊,如蘋果禁用的unique Identif
Time of Update: 2016-01-01
自訂進度條,android自訂進度條用 CAShapeLayer 可以根據傳入的的貝茲路徑UIBezierPath *path , 建立出需要的進度條形狀。然後只要 即時的設定CAShapeLayer的strokeEnd屬性,就可以更新進度條的進度。部分代碼:/** 進度條 和 背景 */- (CAShapeLayer *)createLayer:(UIColor *)strokeColor path:(UIBezierPath *)path { CAShapeLayer *layer =
Time of Update: 2015-12-30
iOS開發日記57-漸層效果SegmentControl,57-segmentcontrol今天博主有一個自訂SegmentControl的需求,遇到了一些困痛點,在此和大家分享,希望能夠共同進步.先來看看,放慢速度,大家就會發現,當紅色view移動時,Label中分割兩邊字型顏色並不一致利用視覺差實現的效果,代碼並不難,貼出來請各位看官自行研究- (void)viewDidLoad { [super viewDidLoad]; // Do
Time of Update: 2015-12-30
iOS開發日記58-廣告輪播collectionView,58-collectionview今天博主有一個利用collectionView製作廣告輪播圖的需求,遇到了一些困痛點,在此和大家分享,希望能夠共同進步.製作廣告輪播圖較為簡單,但其中可用三種方法:1.使用ScrollView製作,簡單明了2.使用TableView製作,將tableview與cell同時改變transform,旋轉90°,實現輪播3.使用CollectionView製作,推薦使用collectionView代碼較
Time of Update: 2015-12-31
Objective-C 筆記 字串操作,objective-c字串 這次總結下OC裡一些對字串的一些操作。 建立字串對象時,會建立一個內容不可更改的對象,稱為不可變對象。可以使用NSString類處理不可變字串。你經常需要處理字串並更改字串中的字元。例如,可能希望從字串中刪除一些字元,或對字串執行搜尋替換操作。這種類型的字串是使用NSMutableString類處理的。 1 // 2 // main.m 3 // Number_String_List_15 4 // 5 //
Time of Update: 2015-12-30
【讀書筆記】獲得現在的時間,讀書筆記獲得現在一,代碼。 - (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"RootViewController"; NSLog(@"------timer--now--%@",[self getTimeForNow]); }#pragma -
Time of Update: 2015-12-29
(NO.00005)iOS實現炸彈人遊戲(五):遊戲資料初始化介紹(二) 我們現在來依次看一下上篇中提到的各個方法,首先介紹的是updateStateLabel方法:#pragma mark MainScene遊戲相關輔助方法//更新主角狀態標籤,格式為:神速 無敵 爆裂 穿牆 穿彈 遙控-(void)updateStateLabel{ NSString *state = [NSString stringWithFormat:@"%@%@%@%@%@%@",
Time of Update: 2015-12-28
IOS積累:SearchBar失去焦點後取消按鈕的異常問題!,/* 程式員的目標是 征服星辰的大海。*/------問題再現: 公司的項目裡很多用到了好友管理,因此搜尋方塊的使用是不可避免的。
Time of Update: 2015-12-24
iOS-xib的使用2---xib的封裝和MVC,ios-xib2---xibmvc一、(M) 建立模型: -------------------------------------------------------------------------------------------------------------------- 二、(V) 封裝xib:
Time of Update: 2015-12-24
iOS 擷取網路狀態,ios擷取網路在iOS開發人員,擷取網路狀態比較常用 -(NSString *)getNetWorkStates{ UIApplication *app = [UIApplication sharedApplication]; NSArray *children = [[[app valueForKeyPath:@"statusBar"]valueForKeyPath:@"foregroundView"]subviews];
Time of Update: 2015-12-24
iOS,ios9①、首先在xcode中的Build Settings中看有沒有設定;②、帳號是不是多個人在用,個人開發人員的帳號只能綁定一台電腦,當另外一台電腦綁定了話,你的電腦就失效了。你確認下是不是這個原因造成的。要想在多台電腦真機調試,你把綁定手機uuid的檔案,還有從綁定認證的電腦鑰匙串中匯出來的認證(個人資訊.p12那個選項)發到另一台電腦,執行兩個檔案就可以了。③、如果是企業帳號,去開發人員中心的Provisioning
Time of Update: 2015-12-23
Objective-C Factory 方法,objective-c工廠類方法用來建立對象的方法就是Factory 方法1、無參Factory 方法 建立對象,並給屬性一個預設值。//無參Factory 方法實現+(Student*)student{ return [[Student alloc]init];}2、有參Factory 方法 2.1.要依賴有參的初始化方法 -(id)initWithAge:(int)age;
Time of Update: 2015-12-23
【代碼筆記】帶輸入框的UIAlertView,輸入框uialertview一,。二,代碼。//點擊任何處,彈出輸入框-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIAlertView *dialog = [[UIAlertView alloc] initWithTitle:@"請輸入分組名稱" message:@"\n" delegate:self cancelButtonTitle:@"添加"
Time of Update: 2015-12-23
iOS轉場動畫初探,ios轉場初探一般我們就用兩種轉場push和presentpresent/** 1.設定代理 - (instancetype)init { self = [super init]; if (self) { self.transitioningDelegate = self; self.modalPresentationStyle = UIModalPresentationCustom; } return self; }
Time of Update: 2015-12-22
cocos2dx 幀動畫(iOS),cocos2dx動畫ios植物大戰殭屍的植物搖擺效果 1 //幀動畫 2 Animation *animation = Animation::create(); 3 4 Sprite *sprite = Sprite::create("1.png"); 5 sprite->setPosition(Vec2(400, 400)); 6 this->addChild(sprite); 7 8
Time of Update: 2015-12-22
NSLayoutConstraint的簡單應用,nslayoutconstraint UIView *topView = [[UIView alloc] init]; topView.backgroundColor = [UIColor redColor]; [self.view addSubview:topView]; topView.translatesAutoresizingMaskIntoConstraints = NO; [self.view
Time of Update: 2015-12-22
iOS UITabBarController的使用,iostabbarcontrollerUITabBarController 和 UINavigationController 幾乎是iOS APP的標配。UITabBarController分欄(標籤欄)控制器,
Time of Update: 2015-12-22
UIMenuItem,uimenuitem使用 UIMenuItem *share = [[UIMenuItem alloc] initWithTitle:@"分享"action:@selector(shareClick:)]; UIMenuItem *report = [[UIMenuItem alloc] initWithTitle:@"舉報"action:@selector(report:)]; UIMenuController *menu = [
Time of Update: 2015-12-22
UIApplication,iosuiapplication一、做一些應用層級的操作(比如在應用程式的表徵圖上顯示數字等):- (IBAction)changeAppNum { UIApplication *app = [UIApplication sharedApplication];// 1.
Time of Update: 2015-12-22
iOS 8 引入的 UIActionSheet 和 UIAlertView 的替代品 - UIAlertController樣式和代碼如下: 換作 Alert 樣式來試試:只需將上面的 UIAlertControllerStyleActionSheet 替換成 UIAlertControllerStyleAlert 即可,其它完全不用動。即使將 "取消" action 先加,它也依舊躺在最底下,待遇平平,不像 actionsheet 中,人家 取消