0

在网页屏幕内单击下拉菜单时,我的应用程序(这是一个 ruby​​ motion IOS 应用程序)冻结了。

def thing
 open_modal WebScreen.new(
  name: "Thing",
  url: testURL,
  nav_bar: true,
  modal: true,
  transition_style: UIModalTransitionStyleFlipHorizontal)
end

应用程序被冻结在这样的事情上。此处的用户单击 SelectCategory 按钮,现在无法执行任何操作。http://i.stack.imgur.com/FpZQ3.png

我的控制台输出:
3 月 11 日 14:59:33:CoreAnimation:栅栏 c413 超时
3 月 11 日 14:59:33:CoreAnimation:更新延迟太久

这是我的网络屏幕类:

class WebScreen < PM::WebScreen
  # status_bar :none
  attr_accessor :url, :name, :id, :thing, :loading

 def on_init
  self.loading = 0
  nav_bar
end

def on_load
  # find.screen.webview.scalesPageToFit = true
  self.title = @name? @name.upcase : "Thing"
  @notifier = Motion::Blitz
end

def content
 NSURL.URLWithString(@url)
end

def load_started
  if self.loading <= 1
   @notifier.loading
   self.loading += 1
  end
end

def load_finished
  @notifier.dismiss
end

def load_failed(error)
 # Optional
 # "error" is an instance of NSError
end

def shut_screen
 @notifier.dismiss
 close({ no_load: true, id: self.id })
end

def nav_bar
  unless self.coupon
   icon = FIEntypoIcon.chevronThinLeftIcon
   icon_image = icon.imageWithBounds([[0, 0], [20, 20]], color:     UIColor.whiteColor)
  set_nav_bar_button :left, image: icon_image, action: :shut_screen
  else
   set_nav_bar_button :left, title: "Done", style: :plain, action: :close_coupon
  end
end

 def close_coupon
rmq.app.alert(title: *, message: "Thing will disappear. Please make sure      you've used the thing before closing.", actions: :yes_no_cancel, style: :sheet) do |action_type|
  case action_type
  when :yes
    shut_screen
  when :no
    puts "FINE!"
  end
end
end

def back
 find.screen.close to_screen: :root
end
end

非常感谢任何信息。

4

1 回答 1

1

所以终于想通了。不知道为什么,但是当您使用图像设置 UITableView 背景视图时,它会在尝试打开下拉列表时冻结 Web 视图。所以不知道如何解决,但我只是设置了 UITableView 背景颜色,这似乎已经停止了冻结

于 2018-10-14T02:32:47.303 回答