presentmodalviewcontroller problem
I have a viewcontr开发者_开发问答oller ticketsviewcontroller. when i do the below code cashrenderedview goes to some where. My requirement is keep the cashrendered controller in the same view (ticketsviewcontroller's view)
code is :
cashrendered *cashrend=[[cashrendered alloc] initWithNibName:@"cashrendered" bundle:nil];
[self presentModalViewController:cashrend animated:YES];
[cashrend.view setFrame:CGRectMake(80, 20, 300, 300)];
[cashrend release];
Thanks in advance
I'm not sure what you mean by "goes to some where".
With your code, you can try:
[self.navigationController presentModalViewController:cashrend animated:YES];
Also, setting the frame wouldnt make sense for a modal view. If you are trying to achieve a view thats less than full screen, You should just use a custom view.
精彩评论