我用CocoaPods v0.36我的Swift项目及以下荚:Alamofire,CocoaLumberjack,SwiftyJSON.
一切都很好,直到我使用我的开发者ID.编译器开始遇到编译项目的问题,在CocoaPods我的项目编译的一些修复和更新之后编译,但在运行时我收到以下错误:
dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire
Referenced from: /Users/Ivan/Library/Developer/Xcode/DerivedData/myApp-bsxfcnwqpaxnzbhencwzteasshzf/Build/Products/Debug/myApp.app/Contents/MacOS/myApp
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
我阅读了与此相关的不同帖子:
但似乎没有人能解决这个问题.
我唯一的线索是3个框架是红色的,所以似乎没有生成/链接.

现在,我删除了我的开发者ID,但问题仍然存在.有人有想法吗?
我必须用几个按钮以编程方式创建一个布局,我使用以下代码创建我的按钮:
let myButton = UIButton(type: .Custom)
myButton.frame = CGRectMake(100,100,100,100)
myButton.setTitle("Normal", forState: .Normal)
myButton.setTitle("Selected", forState: [.Selected,.Highlighted])
myButton.setBackgroundImage(UIImage(named: "normal.png"), forState: .Normal)
myButton.setBackgroundImage(UIImage(named: "selected.png"), forState: [.Selected,.Highlighted])
self.view.addSubview(myButton)
Run Code Online (Sandbox Code Playgroud)
按下后标题和图像不会改变.
如果我引用在Storyboard中创建的UIButton,则相同的代码可以工作.
我需要设置其他任何属性吗?
谢谢