This doesn't seem to be working for me. I am doing the following, but the size is completely ignored. Does it have to do with the fact that I am loading my view from a nib?
(void)swipedUp:(id)sender { NSLog(@"Swiped up"); paletteViewController *viewController = [[paletteViewController alloc] initWithNibName:@"paletteViewController" bundle:nil];
viewController.delegate = self; [ viewController updateSelectedColor:self.drawView.selectedColor]; [ viewController setSize:(ushort)self.drawView.selectedSize];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; navigationController.modalPresentationStyle = UIModalPresentationFormSheet; navigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentViewController:navigationController animated:YES completion:nil]; navigationController.view.superview.frame = CGRectMake(0, 0, 480, 280); navigationController.view.superview.center = self.view.center; }
This doesn't seem to be working for me. I am doing the following, but the size is completely ignored. Does it have to do with the fact that I am loading my view from a nib?
(void)swipedUp:(id)sender {
NSLog(@"Swiped up");
paletteViewController *viewController = [[paletteViewController alloc] initWithNibName:@"paletteViewController" bundle:nil];
viewController.delegate = self;
[ viewController updateSelectedColor:self.drawView.selectedColor];
[ viewController setSize:(ushort)self.drawView.selectedSize];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
navigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:navigationController animated:YES completion:nil];
navigationController.view.superview.frame = CGRectMake(0, 0, 480, 280);
navigationController.view.superview.center = self.view.center;
}