Time of Update: 2014-12-13
iOS自訂modal控制器動畫presentViewController動畫是從下鑽上面來的,但有時候我們需要自訂modal動畫。// 原來的方法- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ RedViewController *redVc = [[RedViewController alloc] init]; redVc.view.backgroundColor = [UIColor
Time of Update: 2014-12-09
IOS
Time of Update: 2014-12-09
淺析ios開發中Block塊文法的妙用 事實上,任何一個應用的開發都離開多線程。而“塊”block與GCD就是蘋果OC語言中多線程的核心。 一.塊的內部結構 在oc中,塊文法以閉包的形式存在,每一個Objective-C對象都佔據著某個記憶體地區。塊本身也是一個對象,在存放塊的對象記憶體地區中,首個變數是指向Class的指標,該指標叫做isa。其餘記憶體裡含有塊對象正常運轉所需的各種資訊。 以下是塊文法的內部結構變數。 1.void*
Time of Update: 2014-12-09
IOS-UITabView樣本總結
Time of Update: 2014-12-08
判斷字串是否為空白,判斷字串 代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"判斷字串是否為空白"; NSLog(@"--字串是否為空白-%i-",[self isBlankString:@"123455"]); }//判斷字串是否為空白- (BOOL)
Time of Update: 2014-12-08
ios 將Log日誌重新導向輸出到檔案中儲存,ioslog 對於真機,日誌沒法儲存,不好分析問題。所以有必要將日誌儲存到應用的Docunment目錄下,並設定成共用檔案,這樣才能取出分析。
Time of Update: 2014-12-08
語音(LCVoiceHudDemo),語音lcvoicehuddemo代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. voice = [[LCVoice alloc] init]; UIButton * button = [UIButton
Time of Update: 2014-12-04
[iOS基礎控制項,ios基礎控制項A.需求1.頭部廣告2.自訂cell:含有圖片、名稱、購買數量、價格3.使用xib設計自訂cell,自訂cell繼承自UITableViewCell4.尾部“載入更多按鈕”,以及其被點擊之後的資料載入重新整理、動畫效果 1 // 設定尾部控制項2 self.tableView.tableFooterView = footerView; 1 /** 初始化方法 */ 2 +
Time of Update: 2014-12-03
Cheatsheet: 2014 11.01 ~ 11.30,cheatsheet11.01Mobile Android SDK: Working with Picasso View Debugging in Xcode 6 5 Common C# tasks in Apple Swift Programming Language Beyond JSON: Spearal Serialization Protocol for iOS .NET
Time of Update: 2014-12-03
iOS中建立數組的簡易方法與手勢的使用其實做外包也是挺不錯,雖然累點,但是一天天的知識的擴充不少,下面是今天的收穫①初始化數組一字典的方法@[] 初始化不可變數組@{} 初始化不可變字典②手勢的使用iOS中處理手勢之前是用四個方法:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent
Time of Update: 2014-12-03
iOS基礎2:UIStepper的使用 (計數器)這是iOS5後才出現的控制項,鑌哥做項目用過,所以列出來,UIStepper是一個類似UISwitch的控制項,但是左右兩邊是一個加號和一個減號。
Time of Update: 2014-12-03
iOS藍芽編程藍芽編程最近公司新來了一部藍芽小票機器,需要對其進行編程,所以閱讀起了iOS藍芽編程的官方文檔,昨日測試成功,想寫下點心得,方便以後查看。言歸正傳。iOS的藍芽架構是支援藍芽4.0協議的。理解iOS CoreBluetooth兩個很重要的概念,Central 和 Periperal
Time of Update: 2014-12-02
將相簿中的多張圖片合成為1張,相簿多張圖片1張 代碼: - (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. NSArray *imgArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"1.jpg"
Time of Update: 2014-12-02
利用圖片序列建立動態圖片效果,圖片序列建立動態代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //顯示圖片的UIImageView UIImageView *imageview=[[UIImageView alloc]initWithFrame:CGRectMake(50, 100, 200, 200)];
Time of Update: 2014-12-01
iOS截屏功能,ios截屏代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. UIImage *image = [self screenshot:UIDeviceOrientationPortrait isOpaque:YES
Time of Update: 2014-11-29
[iOS基礎控制項,ios基礎控制項原圖: 900 x 1305 1 // 2 // ViewController.m 3 // ImageZoom 4 // 5 // Created by hellovoidworld on 14/11/28. 6 // Copyright (c) 2014年 hellovoidworld. All rights reserved. 7 // 8 9 #import "ViewController.h"10 11 @interface
Time of Update: 2014-12-01
[iOS基礎控制項,ios基礎控制項A.需求1.使用只有一個section的TableView來顯示LOL 的英雄列表2.內容包括標題、副標題、表徵圖3.使用plain樣式4.使用MVC模式 1 // 2 // Hero.h 3 // LOLHero 4 // 5 // Created by hellovoidworld on 14/12/1. 6 // Copyright (c) 2014年 hellovoidworld. All rights reserved. 7 //
Time of Update: 2014-11-28
cell的摺疊,cell摺疊:工程圖:代碼中需要引入第三方庫QQView.代碼:AppDelegate.h#import <UIKit/UIKit.h>//加入標頭檔#import "myQQView.h"@interface AppDelegate : UIResponder <UIApplicationDelegate>{ myQQView *qqview;}@property (strong, nonatomic) UIWindow *window;@end&
Time of Update: 2014-11-27
ios開發——解決UICollectionView的cell間距與設定不符問題在用UICollectionView展示資料時,有時我們希望將cell的間距調成一個我們想要的值,然後查API可以看到有這麼一個屬性:- (CGFloat)minimumInteritemSpacing { return
Time of Update: 2014-11-27
IOS閉包循環參考(Swift) 一、何時回形成閉包循環參考?當閉包捕獲自身引用,並且同時銷毀的時候,就會導致循環參考。不熟悉閉包的同學參見這篇文章Swift入門教程系列6-閉包例如:這裡聲明description為一個閉包,這個閉包為lazy變數(lazy 變數只有在需要的時候才會被初始化),這個閉包的功能就是調用類的執行個體函數class CSDN{var name:String?lazy var description:()->() =