小编tim*_*imT的帖子

用swift在viewdid中显示一个模态

我是swift和ios编程的新手.我正在尝试在我的应用程序首次加载时显示模态视图.我遇到的问题是我的模态一直在反复出现.不知道我哪里出错了.

奖金问题:最终我希望这只会在用户第一次打开应用时发生.

class ViewController: UIViewController {

    var introModalDidDisplay = false

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
        showIntroModal()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func showIntroModal() {
        if (!introModalDidDisplay) {
            println(introModalDidDisplay)
            introModalDidDisplay = true
            let intro = self.storyboard?.instantiateViewControllerWithIdentifier("introModal") as IntroModalViewController
            intro.modalPresentationStyle = UIModalPresentationStyle.FormSheet
            self.presentViewController(intro, animated: true, completion: nil)
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

ios swift

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

Magento 2主页404错误

这个让我发疯.我主页上的内容部分返回404,"哎呀我们的坏......".我已经尝试了我能找到的一切,但没有任何效果.我已经尝试了单店模式错误的所有步骤.这没有解决它.我的"默认网址"设置为cms,我的主页被选为"CMS主页".如果我直接浏览CMS页面它可以正常工作,但是当我查看我的主页时,我得到了404 ....

我正在运行Magento 2.1.11版.

php magento http-status-code-404 magento2

2
推荐指数
1
解决办法
2162
查看次数

标签 统计

http-status-code-404 ×1

ios ×1

magento ×1

magento2 ×1

php ×1

swift ×1