作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在用卡钱包创建一个库,但是当我按下 Controller 中的按钮不起作用时,我不知道我的实例是否坏,请需要帮助。
项目的存储库位于 github 中,这是链接: https://github.com/RAES9/WalletOfCards
名称类id WalletOfCards.swift
let controller = self.delegate?.storyboard!.instantiateViewController(withIdentifier: self.destitaionController as String)
self.delegate?.addChild(controller!)
controller!.didMove(toParent: self.delegate!)
Lines: 143,144,15.
Function: tappedButton
最佳答案
我为我的 Controller 创建了新的变量,并在其中添加了新的 subview
let controller = self.dataSource.storyboard!.instantiateViewController(withIdentifier:
self.destitaionController as String)
self.dataSource.addChild(controller)
controller.didMove(toParent: self.dataSource)
controller.view.frame = CGRect(x: 0, y: 0, width: (cardSelected?.frame.width)!, height: (cardSelected?.frame.height)!)
controller.view.alpha = 0.0
self.dataSource.view.addSubview(controller.view)
controller.view.alpha = 1.0
关于ios - 当位于 subview 时,我无法将按钮的 touchUpInside 调用到 ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60104723/
我的代码遇到了很大的困难。我正在开发一个显示歌词和和弦的应用程序。我使用两个重叠的textview分隔了和弦和歌词。 我在这个项目中遇到的问题是音高改变功能。我尽我所能向我解释得更好: 和弦总数为12
我有一个游戏并使用 Tune 作为分析库。使用最新的 Unity (5.3.4f1) 并通过 Unity 获取 apk(无 eclipse/android studio)。 我的游戏在 Play 商店
我是一名优秀的程序员,十分优秀!