原创 IOS7中解決UIImagePickerController出現時候顯示StatusBar
1、首先配置項目plist (1)添加 View controller-based status bar appearance,並設置爲NO (2)添加 Status bar is initially hidden,並設置爲YES
原创 p12 to pem
在Mac上啓動 Keychain助手,然後在login keychain中選擇 Certificates分類。你將看到一個可擴展選項“Apple Development Push Services” 擴展此選項然後右擊“Apple D
原创 cellForRowAtIndexPath 的標準用法
在使用TableView的時候,下面一段代碼是必須的,也是最標準的: [cpp] view plaincopyprint? - (UITableViewCell *)tableView:(UITableView *)tableView c
原创 狀態欄相關
1.隱藏狀態欄 <key>UIStatusBarHidden</key> <true/> <key>UIViewControllerBasedStatusBarAppearance</key> <fa
原创 表格選中不顯示顏色
設置cell 在cell中: self.selectionStyle = UITableViewCellSelectionStyleNone;//選中不顯示顏色
原创 修改xcode中作者名字
方法一: 只要打開終端,輸入命令:defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions '{ ORGANIZATIONNAME = "your name"; }'
原创 UIButton的文字顯示位置
有些時候我們想讓UIButton的title居左對齊,我們設置 btn.textLabel.textAlignment = UITextAlignmentLeft 是沒有作用的,我們需要設置 btn.contentHorizo
原创 關於模態窗口錯誤 Application tried to present modally an active controller
先判斷presentedViewController爲空時,再presentModalViewController if (rootviewController.presentedViewController == nil) {
原创 要用self.bounds
搞了老半天,之前用的是self.frame,一直沒出來,後來改用self.bounds,好了 m_maskImageView = [[UIImageView alloc] initWithFrame:self.bounds];
原创 輸入字符過濾
#define ILLEGALCHAR @"[`~!@#$%^&*+=|{}()':;',\\[\\]<>/?~!@#¥%⋯⋯&*()——+|{}【】‘;:”“’。,、?] "//空格也不允許 #define SHOULD_IN
原创 CGAffineTransformMakeRotation旋轉圖像
UIImage *image = [UIImageimageNamed:@"addcamera_scanning_area.png"]; UIImageView *imageView = [ [ UIImageView allo
原创 uitableview scrollRectToVisible(要顯示的區域)
//使底部顯現 if (_bIsOpen) { [self.tableView scrollRectToVisible:CGRectMake(0, (indexPath.row+1) * self.tableV
原创 mac系統如何顯示和隱藏文件
mac系統如何顯示和隱藏文件 蘋果Mac OS X操作系統下,隱藏文件是否顯示有很多種設置方法,最簡單的要算在Mac終端輸入命令。顯示/隱藏Mac隱藏文件命令如下(注意其中的空格並且區分大小寫):顯示Mac隱藏文件的命令:def
原创 在子線程上調主線程
dispatch_queue_t main = dispatch_get_main_queue(); dispatch_async(main, ^{ [DHMsgCenter PushMsg:_L