我正在用robovm開發一款遊戲&關於ios的libgdx,如何覆蓋UIViewController.viewWillAppear
?如何覆蓋iOS上的UIViewController函數?
(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillHide:)
name:UIKeyboardWillHideNotification
object:nil];
}
謝謝你們,但我在Robovm上用Java開發遊戲。 –