I want to make custom with height of 200px in OBJC, In swift we can do that by setting the detents = [.height(200)], but how do we achieve this in OBJC
Code
UIViewController *io = [[SheetViewController alloc] init]; [io setModalInPresentation:YES]; io.modalPresentationStyle = UIModalPresentationFormSheet; if (@available(iOS 15.0, *)) { UISheetPresentationController *sheetPresentationController = io.sheetPresentationController; sheetPresentationController.detents = @[CGRectGetHeight(200)]; sheetPresentationController.preferredCornerRadius = 30; } [self presentViewController:io animated:true completion:^{ NSLog(@"Sheet Called"); }];
Error in line 10:Passing 'int' to parameter of incompatible type 'CGRect' (aka 'struct CGRect')
I tried setting the height just like Swift but it doesnt work, does anyone know why?