Time of Update: 2014-08-23
iOS UIWebView鍵盤處理+-------------------------+如果你有下面的問題,此文也許會幫到你。鍵盤遮蓋了UIWebView。如何拖動UIWebView來移除鍵盤。鍵盤出現時UIWebView裡面的Content內容向上移動,以至聚焦的文字框超出了UIWebView的可視地區。如何在鍵盤彈出時禁止UIWebView裡面的Content向上移動。無法在UIWebView中擷取到座標,來計算contentOffset得到想要展示的結果。+----------------
Time of Update: 2014-08-06
iOS開發之剖析"秘密"App內容頁面效果(二) @前些天寫了一篇"秘密"的Cell效果文章,但是與在工作中想要的效果還是有差距,而且擴充性很不好,於是重寫封裝,把整體視圖都放到scrollView中,基本是和secret app 一模一樣的效果了.
Time of Update: 2014-07-27
ios中改變UIImagePickerController頁面的button的文字為中文今天調用系統的照相和本地相簿,編輯圖片的功能,但是按鈕都是英文,我想改為中文的 取消,選擇,重拍需要改變兩種方法1. UIImagePickerController頁面的Cancel和Choose按鈕以及截取中得重拍按鈕,想改成中文本來打算通過擷取這些按鈕的指標進行設定的,最後發現可以在工程中直接
Time of Update: 2014-07-27
iOS_3_圖片瀏覽BeyondViewController.h//// BeyondViewController.h// 03_圖片瀏覽//// Created by beyond on 14-7-22.// Copyright (c) 2014年 com.beyond. All rights reserved.//#import @interface BeyondViewController : UIViewController@property (weak, nonatomic)
Time of Update: 2014-07-27
iOS_2_按鈕控制物體形變BeyondViewController.h//// BeyondViewController.h// 02_按鈕控制物體形變//// Created by beyond on 14-7-21.// Copyright (c) 2014年 com.beyond. All rights reserved.//#import @interface BeyondViewController : UIViewController//
Time of Update: 2014-07-03
cell.textLabel.textAlignment = UITextAlignmentCenter;現在要寫成cell.textLabel.textAlignment =NSTextAlignmentCenter;UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil] autorelease];需要寫成static NSString
Time of Update: 2014-07-01
1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 // Do any additional setup after loading the view. 5 6 //1:使用第三方庫 7 NSData *data = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"moe" ofType:@"gif"]]; 8
Time of Update: 2014-06-30
#pragma mark - 這是私人方法,盡量不要再方法中直接使用屬性,因為一般來說屬性都是和介面關聯的,我們可以通過參數的方式來使用屬性#pragma mark post登入方法-(void)loginWithPostWithName:(NSString *)userName pwd:(NSString *)pwd{ //1確定地址NSURL NSString *urlString = [NSString stringWithFormat:@"www.baidu.com"];
Time of Update: 2014-06-30
網路請求的步驟:get請求:#pragma mark - 這是私人方法,盡量不要再方法中直接使用屬性,因為一般來說屬性都是和介面關聯的,我們可以通過參數的方式來使用屬性#pragma mark Get登入方法- (void)loginWithGet:(NSString *)name pwd:(NSString *)pwd{ //1確定地址NSURL NSString *urlString = [NSString
Time of Update: 2014-06-30
遇到這樣一個需求:應用無論處於哪個view controller,搖動手機,都能夠出發某一方法。能夠想到的思路就是用蘋果封裝好的“MotionEvent”,但是如果簡單的把一下代碼加到某一view controller中,那麼只有在該view controller展示在前端時,搖動手機才會出發方法。- (BOOL)canBecomeFirstResponder {//預設是NO,所以得重寫此方法,設成YES return YES;}然後實現下列方法://很像TouchEvent事件 -
Time of Update: 2014-06-29
上一篇在編譯完之後,就很不負責的結束了,本篇就對 PJSIP 庫中提供的一個樣本 iPJSUA 的使用,做一個簡單的介紹。也能解除很多人對官方文檔的一個困擾,起碼我是被困擾過了。 首先,要確保你的 PJSIP 的庫和你即將要編譯的平台對應,或者你直接使用上一篇博文最後連結下載的庫,那樣不用做任何配置,因為它相應的 lib 檔案夾中的庫,都是支援多平台的。 開啟位於:pjsip-apps/src/pjsua/ios/ 下的 ipjsua.xcodeproj ,command + r
Time of Update: 2014-06-30
1.將圖片放進images檔案夾,並改名為images.bundle.拖進項目中2拖動scrollView 並在左上方按住Scroll View 拖到View Controller中 選擇deleagte.vcD4KPHA+1eLKsbryLta4tqhTY3JvbGwgVmlld7XEtPrA7c6qY29udHJvbGxlci4gPC9wPgo8cD48aW1nIHNyYz0="http://www.2cto.com/uploadfile/Collfiles/20140627/2014062
Time of Update: 2014-06-27
1、ios7 tableviewcell上面添加一個view,view上面有button,點擊button不執行button的點擊事件解決辦法:self.view.userInteractionEnabled = YES;[cell.contentView addSubview:self.view]主要問題是cell的高度沒有view本事的高度高,造成view沒有完全在cell上,所以點擊事件執行不了。2、ios7
Time of Update: 2014-06-24
1.線程的狀態NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[thread start];2.控制線程狀態 2.1>啟動線程 -(void)start; //進入就緒狀態->運行狀態.當線程任務執行完畢,會自動進入死亡狀態2.2>阻塞(暫停)線程+(void)sleepUntilDate:(NSDate
Time of Update: 2014-06-11
昨夜瀏覽Demo的時候,看到別人請求網路資料用的是NSURLSession,當時就在想這裡什麼,怎麼沒有用過,引起了我的好奇心,遂去百度-Google-官方文檔一一查看,有了一定的瞭解,原來NSURLSession是iOS7中新的網路介面,它與咱們熟悉的NSURLConnection是並列的。 尋找資料,寫了一個小Demo,大家可以看看,有什麼不足的地方,可以留言幫我指出來.//// HMTRootViewController.m// //// Created by HMT
Time of Update: 2014-06-10
在iOS中, 介面重新整理在主線程中進行, 這導致NSURLSession遠程下載圖片使用UIImageView直接設定Image並不能及時重新整理介面.下面的代碼示範了如何使用 performSelectorOnMainThread: withObject: waitUntilDone: 方法來及時重新整理圖片1. 建立iOS空應用程式(Empty Application).2. 加入一個控制器類. 在YYAppDelegate.m中修改#import
Time of Update: 2014-04-18
ios 設定背景圖片 1.uiscrollview 設定背景圖片// Setup the Scroll ViewUIScrollView*tempScrollView=(UIScrollView*)self.view;tempScrollView.contentSize=CGSizeMake(320,720);// Set Stationary Background, so that while the user scroll the background is// fixed.UIImage*
Time of Update: 2014-04-02
@property (weak,nonatomic)IBOutletUILabel *downLabelInfo;@property (weak,nonatomic)IBOutletUIImageView *imageView; @end @implementationViewController - (void)viewDidLoad{ [super viewDidLoad]; NSString *url =
Time of Update: 2014-03-27
模仿iphone手機通訊錄項目之前實現了拼音排序 通訊錄的設計。現在給通訊錄增加搜尋功能。原介面如下:搜尋功能主要依靠 uisearchbar uisearchdisplaycontroller來實現第一步 初始化:初始化searbar 和seardisplaycontroller 以及 對應的兩個數組(用來顯示全部結果以及搜尋結果)還有對應的delegate@interface ComunicationViewController (){
Time of Update: 2014-03-19
最近項目遇到一個很奇葩的問題點擊按鈕啟動 presentViewController