原创 WebViewJavascriptBridge報錯

錯誤:WebViewJavascriptBridge版本問題(見附件圖片) 解決:更新WebViewJavascriptBridge庫,暫時是更新爲pod'WebViewJavascriptBridge','~> 4.1.4'    

原创 項目裏面訪問AppDelegate做全局變量的方式

.h文件中 + (AppDelegate *)sharedAppDelegate; .m文件中 + (AppDelegate *)sharedAppDelegate {     return (AppDelegate *)[U

原创 UITableView默認選中第一個cell

放置數據讀取後的合適位置即可 NSInteger selectedIndex = 0; NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIn

原创 不能選擇設備(真機,模擬器都不可以)

錯誤:不能選擇設備(真機,模擬器都不可以) 解決:TARGETS選中General --> Deployment Info --> Deployment Target 版本調低(比真機或者模擬器低)

原创 pch文件

配置: 1、在工程中新建一個PCH 文件:New File ->Other ->PCH File(這就是需要新建的pch文件,點擊改好名字和路徑) ->Create。這時候就創建好了一個pch文件 2、把pch 是我路徑改爲相對路

原创 項目中某個頁面強制橫屏

需求:項目中某個頁面強制橫屏,其他頁面仍爲豎屏 解決:在viewDidLoad中調用下面的方法 - (void)hengping{    [[BXNavigationItemHelpersetupReturnButtonWithContr

原创 主頁添加網絡狀態

- (void)viewDidLoad {    //openfire 連接狀態通知     [[NSNotificationCenter defaultCenter] addObserver:self selector:@sel

原创 狀態欄的edgesForExtendLayout屬性

edgesForExtendLayout是iOS7之後一個類型爲UIExtendedEdge的屬性,指定邊緣要延伸的方向,它的默認值是UIRectEdgeAll,四周邊緣均延伸,就是說,如果即使視圖中上有navigationBar,下有t

原创 字符

一個漢字等於兩個字符

原创 Masonry從0到使用

以前一直是用代碼適配,這次想嘗試一下使用Masonry。從頭開始。 1、pod 'Masonry' 先用 pod 配置三方庫,but第一次沒成功。 2、#define MAS_SHORTHAND 添加這句代碼到你的pch文件中,這樣你就不

原创 按鈕中圖片和文字的左右位置

文字在右,圖片在左(默認狀態) button.imageEdgeInsets =UIEdgeInsetsMake(0,0, 0, labelWidth); button.titleEdgeInsets =UIEdgeInsetsMa

原创 在pod中引入XMPPFramework時報錯

錯誤:在pod中引入XMPPFramework時報錯(報12個錯誤,錯誤在DDXMLNode.h裏面) 解決:DDXMLNode.h裏面,用     #import <Foundation/Foundation.h>     #imp

原创 could not find developer disk image

錯誤:could not find developer disk image 解決:手機系統版本過高            1)升級Xcode            2)拷貝本文附件到“/Applications/Xcode.app/Co

原创 miss @end

錯誤:miss @end 解決:這個錯誤並不在報錯的地方,是其他地方多了什麼,或者少了什麼

原创 Your build settings specify a provisioning profile with the UUID

我的第一篇博客,啾啾啾 錯誤:“Your build settings specify a provisioning profile with the UUID “”, however, no such provisioning prof