swiftBUG
1.required init?(coder aDecoder: NSCoder){
fatalError("init(coder:)has not been implemented")
}
}
/Users/apple/Desktop/資料/01項(xiàng)目第十一天/WeiboClassFive/WeiboClassFive/class/View(視圖和控制器)/Compose(發(fā)微博)/EmotionKeyBoard/EmotionToolBar.swift:48:14: Failable initializer 'init(coder:)' cannot override a non-failable initializer
解決:去掉問號
required init(coder aDecoder: NSCoder){
fatalError("init(coder:)has not been implemented")
}
}
2.
[!]Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.? You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.是由于我裝了多個(gè)Xcode導(dǎo)致路徑變了,
解決:hwjdeMacBook-Pro:IJiaXiao_JiaoLian hwj$ sudo xcode-select -switch /Applications/Xcode6.3.1/Xcode.app
3.代理用逗號鏈接繼承的類
class RecordViewController: UIViewController,LFLiveSessionDelegate{
4.appdelegate
dict[NSLocalizedDescriptionKey]= "Failed to initialize the application's saved data" as AnyObject?
dict[NSLocalizedFailureReasonErrorKey]= failureReason as AnyObject?
5.detailView
5.實(shí)現(xiàn)代理方法
extension RecordViewController : LFLiveSessionDelegate {
/*實(shí)現(xiàn)協(xié)議所規(guī)定的內(nèi)容*/
}
6.
Segmentation fault: 11 swift
解決:刪除masterView
7.storyboard畫圓角
8.跳轉(zhuǎn)隱藏tabBar
composeNav.hidesBottomBarWhenPushed = YES;
NextViewController *next=[[NextViewController alloc]init];
[self.navigationController pushViewController:next animated:YES];
self.hidesBottomBarWhenPushed=NO;
9.跳轉(zhuǎn)隱藏NavigationBar
10.使用第三方框架或者pod,需要橋接文件kaixin01/kaixin01-Bridging-Header.h還有拖入.h和.m文件到項(xiàng)目中
11.枚舉元素的限制不能被引用作為實(shí)例成員swift?????????????????
audioSession == AVAuthorizationStatus.restricted || audioSession == AVAuthorizationStatus.authorized
12.instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
解決:init storyBoard
13.One of the two will be used. Which one is undefined.
文件重復(fù)