原创 UITextField 限制輸入數字及小數點
#define kNumbersPeriod @"0123456789." -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRa
原创 UISearchBar 的使用
// // AddDiseaseSubjectViewController.m // com.yx129.yxClientDoctor3 // // Created by yx on 14/12/4. // Copyright
原创 cell 複用問題 cell中控件單選,多選,帶標籤圖的不可選中
帶標籤圖的不可選中 // // AddVisitTimeVC.h // com.yx129.yxClientDoctor3 // // Created by yx on 15/1/30. // Copyright (c)
原创 SearchBar 的觸發事件
// kvo kvc - (void)viewDidLoad { [super viewDidLoad]; //初始化指示器 HUDManager = [[MBProgressHUDMana
原创 用 UITextField 自定義UISearchBar 監聽輸入字符串改變的問題
用 UITextField 自定義的 UISearchBar 沒有如下的 UISearchBar 中的協議方法 - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NS
原创 nsdictionary ,nsarray 和 json 字符串 的轉換
一,提交數據: foudation 類型轉 json 字符串 1.字符拼接方法 NSMutableString *listStr = [[NSM
原创 tableview 索引條問題
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)inde
原创 iOS 證書
其中Bundle Identifier爲蘋果的AppID,必須與應用發佈是配置的Profile關聯的AppID一致;Version爲應用版本號,在App Store中顯示的版本號,推薦與manifest.json中version下的na
原创 uitextfiled 輸入 過濾
// 空格過濾 -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(N
原创 vim更改縮進空格數和TAB鍵縮進數
打開/etc/virc 附加如下內容: set tabstop=4 set shiftwidth=4 "設定 Tab 鍵縮進的空格數 set tabstop=4 "設定編輯器將多少空格視爲一個縮進 set shiftwid
原创 數據庫操作添加數據 出錯 unrecognized token:
在sqlite3插入數據表時,出現的錯誤: DB Error: 1 "unrecognized token: "522ee9ace4b0600fb8ffde24"" 解決方法: 插入的字符串需加引號' NSString *
原创 uitoolbar item 自動調整佈局
//創建barbuttonitem,樣式是flexible,這個種barbuttonitem用於兩個barbuttonitem之間 //調整兩個item之間的距離.flexible表示距離是動態的,fixed表示是固定的
原创 git 基本使用
初始化一個Git倉庫,使用git init命令。 添加文件到Git倉庫,分兩步: 第一步,使用命令git add <file>,注意,可反覆多次使用,添加多個文件; 第二步,使用命令git commit,完成。
原创 sharesdk WeiboSDK registerApp:kAppKey 崩潰
使用xcode6.1創建的項目, 添加新浪SDK,運行[WeiboSDK registerApp:kAppKey];這一步崩潰,拋出以下 *** Terminating app due to uncaught exception 'N
原创 IOS 中設置UITextView 顯示文本的光標
textView.selectedRange=NSMakeRange(0,0) ; //起始位置 textView.contentInset = UIEdgeInsetsMake(-24, -6, 0, 0); // 內容的位置