0
嘗試耙動我正在處理的項目時出現以下錯誤,我無法弄清楚原因。無論我發送了什麼變量,都會發生這個消息。使用setTranslucent時出現RubyMotion錯誤
Objective-C stub for message `setTranslucent:' type `[email protected]:c' not precompiled. Make sure you properly link with the framework or library that defines this message
這是我的app_delegate文件以供參考。
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
navigation_appearance
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
tableView = StopsController.alloc.init
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(tableView)
@window.makeKeyAndVisible
true
end
def navigation_appearance
UINavigationBar.appearance.setBackgroundImage UIImage.imageNamed('navbar_bg.png'),
forBarMetrics: UIBarMetricsDefault
UINavigationBar.appearance.setTranslucent(true)
UINavigationBar.appearance.setShadowImage UIImage.imageNamed('navbar_shadow.png')
end
end