单击图标时 View 上有一个图像图标,另一个 View (其他 xib)就像键盘打开一样打开,它应该从底部仅覆盖屏幕 30%,单击当前图标的任何图标时有五个图标应该用选定的图标替换。它是一个 ipad 应用程序。谢谢大家。
最佳答案
用这个:-
在 ViewDidLoad 中,同样给出另一个 View Controller 的帧大小,使其仅覆盖屏幕的 30%。之后:-
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event allTouches] anyObject];
CGPoint startLocation = [touch locationInView:self.view];
if([touch view]==yourFirstImageIcon)
{
// alloc this youranotherviewcontroller in ViewDidLoad
[self presentModalViewController:youranotherviewcontroller animated:Yes];
//It will show your another View having five more icons like keyboard
}
}
关于iphone - 在没有导航的 ipad 应用程序中单击按钮打开 View (另一个 xib),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10492785/