【问题标题】:UIScrollView doesn't scroll with RubyMotionUIScrollView 不使用 RubyMotion 滚动
【发布时间】:2013-06-05 12:32:41
【问题描述】:

我有一个测试应用程序,我试图让 UIView 滚动并在键盘出现在屏幕上时向上移动。当我输入以下代码并尝试通过模拟器运行滚动时,我的 UIScroll 无法正常工作。

@scrollwindow = UIScrollView.alloc.initWithFrame(CGRect.new([0,0],[700,800]))
@scrollwindow.scrollEnabled = true
@scrollwindow.delegate
@window.addSubview(@scrollwindow)

@frame1 = UIView.alloc.initWithFrame(CGRect.new([10,10], [400, 200]))
@frame1.backgroundColor = UIColor.redColor
@scrollwindow.addSubview(@frame1)

@frame2 = UIView.alloc.initWithFrame(CGRect.new([20, 400], [600,700]))
@frame2.backgroundColor = UIColor.greenColor
@scrollwindow.addSubview(@frame2)

我熟悉我对 Ruby 的理解,但对 RubyMotion 和 Objective-C 社区是陌生的。任何帮助将不胜感激。

【问题讨论】:

标签: uiscrollview rubymotion


【解决方案1】:
猜你喜欢
  • 2016-09-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-15
  • 2013-07-02
相关资源
最近更新 更多