项目中遇到的问题

  • dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
    target dependencies 我没有添加Alamofire框架也可以解决问题(模拟器上)


    build phases.png
general.png

参考链接:https://github.com/Alamofire/Alamofire/issues/101
down voteaccepted

  • Expression of type 'UIViewController?' is unused

popViewController(animated:) returns UIViewController?, and the compiler is giving that warning since you aren't capturing the value. The solution is to assign it to an underscore:
_ = navigationController?.popViewController(animated: true)

参考链接:http://stackoverflow.com/questions/37843049/xcode-8-swift-3-expression-of-type-uiviewcontroller-is-unused-warning

  • 突然发现按钮无法点击,原来是View A显示为cyan颜色,
    Button是放在View B上面的,然后将View B放在View A上,当时没设置View B的frame,所有无法接受点击事件。

2016-10-20 at 下午5.30.png

参考链接:UIButton无法响应点击事件

  • 不能将swift中自定义枚举值直接给服务端
enum MTPublishJobType: Int {
    case fulltime = 0
    case parttime = 1
}
  self.parametersList["parttime"] = 0
//  self.parametersList["parttime"] = MTPublishJobType.parttime这样传参有问题,
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容