尝试 rake 我正在处理的项目时出现以下错误,我不知道为什么。无论我发送什么变量,该消息都会发生。
Objective-C stub for message `setTranslucent:' type `v@: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