小编nin*_*ger的帖子

无法呈现和更新UIViewController的自动布局状态:dlopen(Cosmos.framework,1):找不到合适的图像

我在我的项目中使用Cosmos Pod作为星级.在将视图类设置为CosmosView之后,我的一个Storyboard中出现错误:

file:///Users/FedericoVivian/Documents/Documenti%20personali/CSMApp/CSMApp/LogBook/LogBook.storyboard:error:IB Designables:无法呈现和更新UIViewController(GJw-lE-8co)的自动布局状态:dlopen( Cosmos.framework,1):找不到合适的图像.找到:Cosmos.framework:'Cosmos.framework'缺少必需的代码签名

我使用这个版本

Cosmos发布15.0.0 Xcode 9.3 Swift

我该如何解决这个错误?它导致整个故事板为空白.

请帮帮我 !!

rating ios cosmos swift

8
推荐指数
1
解决办法
2759
查看次数

如何快速更改标签的位置

我已经阅读了很多如何更改标签位置的内容,但我做不到。这是我的简单代码

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var TEKST: UILabel!
    @IBOutlet weak var klik: UIButton!
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor.green
        // Do any additional setup after loading the view, typically from a nib.
    }

    @IBAction func kliksad(_ sender: UIButton) {
        if (view.backgroundColor==UIColor.green){
            TEKST.isHidden = false
            TEKST.text = "Hi"
            view.backgroundColor = UIColor.red
            TEKST.frame.size.width = view.frame.size.width
        } else if(view.backgroundColor == UIColor.red) {
            view.backgroundColor=UIColor.green
            TEKST.textColor=UIColor.purple
            TEKST.text = " Hello "
            TEKST.frame.origin = CGPoint(x: 10, y: 50)
            print(TEKST.frame)
        } …
Run Code Online (Sandbox Code Playgroud)

label position ios swift

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

ios ×2

swift ×2

cosmos ×1

label ×1

position ×1

rating ×1