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
引言:最近學習了一些頁面的跳轉動畫效果。使用的是UIview的animateWithDuration方法。當然之前的beginAnimations也是可以實現的。 比如一:從螢幕下部往上漸漸彈出一個圖片[plain] -(void) fadeIn { CGRect rect = [[UIScreen mainScreen]
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
Prepare Provisioning profile:Keychain Access-->Certificate Assistant-->Request a Certificate from a Certificate Authority-->input email address (App ID), saved to disk. Sign in https://developer.apple.com-->iOS Provisioning Portal--&
Time of Update: 2013-12-10
1. 建立fake framework使用這個XCode Plugin: iOS-Universal-Framework 使用它可以直接建立靜態庫XXX.framework, 不需要太多複雜設定.2. 下載ASIHttpRequest的源碼: ASIHTTPRequest3. 通過以上Plugin建立 fake static iOS framework, 並在項目BuildSetting中搜尋 automatic reference , 將
Time of Update: 2013-12-10
[java]#import "Utility.h" @implementation Utility +(NSString *)createMD5:(NSString *)signString { const char*cStr =[signString UTF8String];
Time of Update: 2013-12-10
iOS5中加入了新知識,就是ARC,其實我並不是很喜歡它,因為習慣了自己管理記憶體。但是學習還是很有必要的。 在iOS開發過程中,屬性的定義往往與retain, assign, copy有關,我想大家都很熟悉了,在此我也不介紹,網上有很多相關文章。現在我們看看iOS5中新的關鍵字strong, weak, unsafe_unretained.
Time of Update: 2013-12-10
copy: 建立一個索引計數為1的對象,然後釋放舊對象retain:釋放舊的對象,將舊對象的值賦予輸入對象,再提高輸入對象的索引計數為1那上面的是什麼意思呢?Copy其實是建立了一個相同的對象,而retain不是:比如一個NSArray對象,地址為11111,內容為xxCopy到另外一個NSArray之 後,地址為22222,內容相同,新的對象retain為1, 舊有對象沒有變化retain到另外一個NSArray之
Time of Update: 2013-12-10
繼承UILabel,重載drawTextInRect方法。//1.header file#import <UIKit/UIKit.h>@interface InsetsLabel : UILabel@property(nonatomic) UIEdgeInsets insets;-(id) initWithFrame:(CGRect)frame andInsets: (UIEdgeInsets) insets;-(id) initWithInsets: (UIEdgeInsets)
Time of Update: 2013-12-10
iphone QQ協議,QQ iphone協議 QQ Iphone登陸協議其實只要兩個包即可。 沒解之前感覺神秘莫測,解完之後感覺QQ也真是膽大啊!以下為網上抄來的一段,不同版本協議加密方法一樣,只是特徵碼大同小異而已。 [NO.1 2013-02-18 12:59:15 383 SEND 482位元組]00 00 01 E2 00 00 00 03 02 00 00 00 04 00 00 0000 0C 31 31 31 31 31 31 31 31 E6 B0 29
Time of Update: 2013-12-10
我是建立一個scrollview,然後在裡面添加imageview,imageView的建立主要代碼如下:@interface ImagePageView : UIView@property (nonatomic,retain)UIImageView *imageViewOne;@property (nonatomic,retain)UIImageView *imageViewTwo;- (void)imageViewV:(int)pageNum;-
Time of Update: 2013-12-10
13 days more than 106 users to download iOS the individual app "GPSBOX" online.Although only a few downloads,but for me personally is certainly.In particular, there is a lot of foreign friends download.But "GPSBOX" be considered
Time of Update: 2013-12-10
1 前言本文為臨時加塞,由於工作需要,公司要求將Xcode中的項目產生IPA檔案,用於版本記錄,由於沒有咱們木有開發人員帳號,所以需要另類的IPA產生和發布方式,今天折騰了一番終於搞定了,特此與大家分享。2 操作流程2.1 將運行時Schema設定為IOS Device, 2.2 點擊Product->Archive歸檔項目: 2.3 歸檔後進入到歸檔視窗,選擇分配方式: 2.4 選擇企業或者點對點的方式,然後點擊下一步: 2.5
Time of Update: 2013-12-10
typedef enum { UITableViewCellSelectionStyleNone, UITableViewCellSelectionStyleBlue, UITableViewCellSelectionStyleGray} UITableViewCellSelectionStyle//cell右邊按鈕格式typedef enum {
Time of Update: 2013-12-10
從2013-5-1日開始蘋果就禁止對UUID的應用的通過了。所以我們需要用一些辦法替換,下面我就是用keychain的訪問替換掉UUID的。那麼,關於Keychain的應用,Apple提供了一個叫GenericKeychain的例子程式,在這裡:http://developer.apple.com/library/ios/#samplecode/GenericKeychain/Listings/Classes_KeychainItemWrapper_h.html#//apple_ref/doc/
Time of Update: 2013-12-10
delegate針對one-to-one關係,並且reciever可以傳回值給sender;notification
Time of Update: 2013-12-10
1 前言使用 dispatch_queue_create 函數。 建立你自己的、獨特命名的指派隊列。2 代碼執行個體ZYAppDelegate.m [plain]- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //建立自己命名的隊列 &
Time of Update: 2013-12-10
1 前言本文將介紹如何函數調用Block Object以及Block Object調用Block Object。2 代碼執行個體TestDemo.h[plain]#import <Foundation/Foundation.h> @interface TestDemo : NSObject - (void) callSimpleBlock; - (void)
Time of Update: 2013-12-10
1 前言UIPinchGestureRecognizer捕獲並處理類似放大和縮小的手勢動作。2 代碼執行個體ZYViewController.m [plain]- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor
Time of Update: 2013-12-10
1 前言得到圖形環境,然後用 CGContextMoveToPoint 和 CGContextAddLineToPoint 函數來畫線。2 代碼執行個體ZYViewControllerView.m [plain]- (void)drawRect:(CGRect)rect{ [self drawRooftopAtTopPointof:CGPointMake(160.0f, 40.0f) textToDisplay:@"Miter&