Time of Update: 2013-12-10
前不久完成了在Java ME,BlackBerry, Android, Java SE, .Net CE, .Net Desktop平台上地圖開發包開發工作。終於有時間開始學習Mac OS, iPhone開發。最終目標是將地圖開發包移植到Mac OS 和 iPhone平台上。做軟體開發很多年來,一直沒有機會接觸Mac
Time of Update: 2013-12-10
Objective-C現在幾乎已經變成了蘋果的專利了,可以直接在蘋果的Xcode上編譯Objective-C程式,但是在Windows平台下的編譯工具就寥寥無幾了,本身這種語言用的人就不是很多。今天在網上突然看到了有人發帖,可以在Windows平台下編譯Objective-C,就抱著好奇的心態試了試。沒想到,居然成功了,現在就把怎樣搭建Objective-C編譯平台的經驗拿出來和大家分享。1、安裝GNUstepGNUstep Windows
Time of Update: 2013-12-10
IOS中的動畫右兩大類1.UIView的視圖動畫2.Layer的動畫 UIView的動畫也是基於Layer的動畫動畫的代碼格式都很固定1.UIView動畫一般方式[UIView beginAnimations:@"ddd" context:nil];//設定動畫[UIView commitAnimations]; //提交動畫這兩個是必須有的,然後在兩句的中間添加動畫的代碼[UIView beginAnimations:@"ddd"
Time of Update: 2013-12-10
UIPageController是大多數IOS教程上不會寫的系統內建控制項。它主要的功能是實現視圖分頁,有點類似於網頁上的分頁功能。這次主要通過一個例子來講講UIPageController控制項和UIScrollView的應用。首先: 圖中標有紅框的地方,便是UIPageController的展現樣式,在xcode裡它是這個樣子的:現在要開始使用UIPageController控制項了,首先在申明檔案頂部添加一個常量,來定義滾圖中的子項數量 #define PAG
Time of Update: 2013-12-10
說實話,我不大清楚.aspx和.asmx究竟哪個比較好。我在這裡用的是.aspx,因為我覺得更方便一些。 [plain]public partial class upload : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e)
Time of Update: 2013-12-10
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellStr]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
Time of Update: 2013-12-10
object creation:An object comes into runtime existence through a two-step process that allocates memory for the object and sets its state to reasonable initial values. To allocate an Objective-C object, send an alloc or allocWithZone: message
Time of Update: 2013-12-10
1.建立Phonegap工程MyPlugin環境xcode4.5.1phonegap2.1.02.在Plugin檔案夾下建立實現Plugin子類[plain] // // MyPlugin.h // MyPGPlugin // // Created by kllmctrl on 12-10-29. // // #import <Cordova/CDV.h>&
Time of Update: 2013-12-10
編譯別人的工程出現如下錯誤:Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in the default keychain1)看錯誤大概可以猜到:該工程原來在真機下編譯,需要認證認證,再看該工程的scheme,確實是iOS Device2) 修改scheme為iPhone X.0
Time of Update: 2013-12-10
要求:1、從基於Xcode空項目模板開始 2、兩頁之間能相互傳遞資料
Time of Update: 2013-12-10
考慮到緩衝實現多數使用單例模式,這裡使用C++的模版方式設計了一個Singlton基類,這樣以後只要繼承該類,子類就會支援單例模式了。其代碼如下: [cpp] // // SingltonT.h // #ifndef SingltonT_h #define SingltonT_h #include <iostream>
Time of Update: 2013-12-10
1、開啟本地推送並設定屬性 [cpp] NSString *str = @"本地推送的資訊"; UIApplication *app = [UIApplication sharedApplication]; UILocalNotification *notification = [[UILocalNotification alloc]init];//初始化本地推送
Time of Update: 2013-12-10
.h檔案[plain] @interface Interface1 : UIViewController { IBOutlet UIScrollView *scroller; IBOutlet UILabel *warnung; } @property (nonatomic,
Time of Update: 2013-12-10
原問題描述:需要實現iphone中關於Foursquare整合,但是不知道從何入手,請幫忙給一些建議和指點。謝謝解決方案:這裡是foursquare api 連結Foursquare integration 樣本連結更多代碼:Foursquare integration[plain] - (void)viewDidLoad { [super viewDidLoad];
Time of Update: 2013-12-10
1.UITextField的初始化和設定 UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 200, 300, 40)];textField.borderStyle = UITextBorderStyleRoundedRect;textField.font = [UIFont systemFontOfSize:15];textField.placeholder =
Time of Update: 2013-12-10
print?#import <Foundation/Foundation.h> @interface UUID : NSObject {} @property (nonatomic, readonly, retain) NSString *UUIDString; + (UUID *)sharedUUID; @end #import
Time of Update: 2013-12-10
[cpp] view plaincopyprint?在.h檔案匯入庫檔案 在.h檔案匯入庫檔案[cpp]#import <MediaPlayer/MPMoviePlayerViewController.h> #import <MediaPlayer/MPMoviePlayerViewController.h>[cpp] view plaincopyprint?在.m實現檔案中 在.m實現檔案中[cpp]NSString
Time of Update: 2013-12-10
obj-c本質就是"改進過的c語言",大家都知道c語言是沒有記憶體回收(GC)機制的(註:雖然obj-c2.0後來增加了GC功能,但是在iphone上不能用,因此對於iOS平台的程式員來講,這個幾乎沒啥用),所以在obj-c中寫程式時,對於資源的釋放得由開發人員手動處理,相對要費心一些。引用計數這是一種古老但有效記憶體管理方式。每個對象(特指:類的執行個體)內部都有一個retainCount的引用計數,對象剛被建立時,retainCount為1,可以手動調用retain方法使
Time of Update: 2013-12-10
1 前言上一次我們介紹了Storyboard的簡單建立方法,這次我們來介紹一下如何通過Storyboard進行兩個ViewController之間的傳值。2 代碼執行個體2.1 建立一個不帶nib檔案ViewController檔案 2.2 將Storyboard中的第二個視圖控制器的類設定為建立的SecondView 2 .3
Time of Update: 2013-12-10
iOS4已經直接支援blocks,很有必要學習一下。在ios,blocks是對象,它封裝了一段代碼,這段代碼可以在任何時候執行。Blocks可以作為函數參數或者函數的傳回值,而其本身又可以帶輸入參數或傳回值。它和傳統的函數指標很類似,但是有區別:blocks是inline的,並且它對局部變數是唯讀。Blocks的定義: int (^myBlock) (int a,int b) = ^(int a,int b){ &