Time of Update: 2013-12-10
就用這就能開啟safari;NSURL* url = [[ NSURL alloc ] initWithString :@"http://www.baidu.com"];[[UIApplication sharedApplication ] openURL: [url autorelease ]];如果當webView內部開啟連結時用safari當然這必須委託給自己webView.delegate=self;也當然要加
Time of Update: 2013-12-10
近幾年並沒有真正深入的做過幾個複雜的移動互連網產品設計,而且我這人本來就懶不愛讀書,也就一直沒有好好去研讀ios和android的設計指南。幾年來這兩份一直就在那裡,不離不棄。最近得空,把HIG剛剛讀完,正在開始讀Android Design。HIG(Human Interface
Time of Update: 2013-12-10
在代碼中調用如下代碼:NSURL*url=[NSURL URLWithString:@"prefs:root=NOTIFICATIONS_ID"];[[UIApplication sharedApplication] openURL:url];即可跳轉到設定頁面的對應項。About — prefs:root=General&path=AboutAccessibility —
Time of Update: 2013-12-10
一、軟體安裝首先通過appstore下載安裝Xcode開發工具,當前編寫文檔時最新版本為4.5.1 二、通過Xcode工具編寫運行測試指令碼說明:如果是在IOS模擬器上運行測試案例,需要有被測試應用的原始碼才有許可權把應用安裝到模擬器中,當前樣本中使用了自己編寫的一個簡單Iphone應用,大家也可以直接在網上搜尋一個開源的應用即可。 1、當你有了一個應用的原始碼之後,在Xcode工具中,首先選中被測應用,然後點擊功能表列中的“Product-Profile&rdq
Time of Update: 2013-12-10
IOS的view沒有點擊功能,又是和Android 的一大差別,沒辦法,自訂一個,本來是想自己寫一個的,逛了一下github,發現有同行已經寫好了,我也不需要在重複了,這裡只是記錄一下吧: 這裡我們為UIViuew定義了Category,如下:UIView+WhenTappedBlocks.h[cpp] 01.#if NS_BLOCKS_AVAILABLE 02. 03.#import
Time of Update: 2013-12-10
在.plist裡添加 Application supports iTunes file sharing YES,這樣就可以在itunes查看日誌了,非常方便!NSFileManager * filemangage =[NSFileManager defaultManager]; NSArray *paths= NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
Time of Update: 2013-12-10
上一篇:http://www.bkjia.com/kf/201301/185018.htmlUINavigationController實現導航在App委託中的.h檔案裡@property( nonatomic ,strong)UINavigationController *nav;.m檔案裡@synthesize nav;-(BOOL)application:(UIApplication *)application
Time of Update: 2013-12-10
上傳圖片和資料到伺服器 是最基本的需求了,有些學IOS的 可能對伺服器怎麼接收圖片這塊不太瞭解。 所以今天 我把伺服器的代碼 也拷過來了。。。 只會ASP.NET 。。 PHP 和J2EE 應該差不多 都是幾句話的事 IOS端代碼: NSString* path = [[NSBundlemainBundle]pathForResource:@"iphone1-1-10"ofType:@"png"];
Time of Update: 2013-12-10
UIToolbar * topView = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, 320, 30)]; [topView setBarStyle:UIBarStyleBlack]; //UIBarButtonItem * helloButton = [[UIBarButtonItem
Time of Update: 2013-12-10
很多Git命令都是在命令列下啟動並執行,命令列下管理Git有很多優點不用多說。但最大的缺點是要求使用者記住這些命令。因此Git圖形介面還是很受一些使用者歡迎的,其中Xcode作為整合式開發環境工具,也提供了一定Git圖形介面功能。但是要想在Xcode中使用Git管理工程代碼還想需要進行一些配置,然後才能使用。 如果我們是使用Xcode 4建立的一個iOS工程,在終端的命令列中提交代碼時候,可能會出現下面的部分資訊: [cpp] create mode 100644
Time of Update: 2013-12-10
簡單的整理一下實現的思路:1. 既然是要顯示半透明的蒙板圖片,UIImageView肯定是少不了了。2. 要多頁顯示且能左右滑動,把UIImageView嵌入到UIScrollView中,並將UIScrollView的pagingEnabled屬性設為YES,即可實現整頁的滑動。3. 按當下流行的設計方案,圖片滑動時,用點來表示當前頁和總頁數,這個就要用到UIPageControl控制項了。4.
Time of Update: 2013-12-10
捕捉螢幕CALayer執行個體使用Core Graphics的renderInContext方法可以將視圖繪製到映像上下文中以便轉化為其他UIImage執行個體。前提先#import+ (UIImage *) imageFromView: (UIView *)theView { // draw a view's contents into an image context
Time of Update: 2013-12-10
#import <Foundation/Foundation.h>#import "Blog.h" // Typestypedef enum { ConnectionTypeAsynchronously, ConnectionTypeSynchronously} ConnectionType; @class Parser; @protocol
Time of Update: 2013-12-10
一般同時還有:'retain' is unavailable: not available inautomatic reference counting mode 的錯誤提示 從字面上來解釋就是,arc 禁止顯示發送retain訊息。其實就是使用ARC之後,不允許直接調用retain, release, autorelease, dealloc,
Time of Update: 2013-12-10
1 前言UIBarButtonItem為導覽列按鈕,在導覽列的左側和右側,他們具有許多種不同的形狀和形式。2 代碼講解ZYViewController.m [plain] (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view,
Time of Update: 2013-12-10
1 前言UIPickerView(選取器)也是出鏡率相當高的控制項,類似與HTML中的Select,今天我們就一起來學習一下這個控制項。2 UIPickerView簡介關鍵代碼:.h檔案:[plain]#import <UIKit/UIKit.h> //需要實現UIPickerViewDataSource,UIPickerViewDelegate協議 @interface ZYViewController :
Time of Update: 2013-12-10
1 前言UIButton為按鈕控制項,在IOS開發中十分常見,可以為其設定事件。2 代碼執行個體ZYViewController.m: [plain]@synthesize myButton; - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading
Time of Update: 2013-12-10
typedef enum { UITableViewCellSelectionStyleNone, UITableViewCellSelectionStyleBlue, UITableViewCellSelectionStyleGray} UITableViewCellSelectionStyle//cell右邊按鈕格式typedef enum {
Time of Update: 2013-12-10
delegate針對one-to-one關係,並且reciever可以傳回值給sender;notification
Time of Update: 2013-12-10
1 前言今天我們來學習使用 UIView 的動畫方法來移動你的視圖。2 代碼執行個體ZYViewController.m: [plain]- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a