я добавил представление уведомления в качестве тоста в приложении делегат файл я добавил в качестве кода класса следующего образом,окно в ориентации делегата приложения не работает
customView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 54)] autorelease];
[customView setBackgroundColor: UIColorFromRGB(0xda5340)];
UILabel *lb1=[[[UILabel alloc]initWithFrame:CGRectMake(10, 17, 180, 21)] autorelease];
[email protected]"Pet is out of boundary";
lb1.textAlignment = UITextAlignmentCenter;
lb1.textColor=[UIColor whiteColor];
lb1.backgroundColor = [UIColor clearColor];
[customView addSubview:lb1];
[self.window addSubview:customView];
[self.window showToast:customView duration:3.0 position:@"top" ];
я поставил свой Ipad Application Скин, как пейзаж, приведенные выше код работает правильно только с iphone, когда я пытался в ipad его неправильно ориентировать, customView
рассматривается как вертикальный. я добавил следующий код также,
-(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation {
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAll;
}
Если я хочу добавлен любой другой код, пожалуйста, помогите мне решить
я сделал, даже если его не ж orking – fazil