Closed Supertecnoboff closed 8 years ago
Hi,
As mentioned in the readme file you have to subclass RMActionController. In this subclass you have to set the contentView property to a view of your choice. You may take a look at the example project in this repository ;)
Best regards, Roland
Is there any reason to make overriding mandatory? Wouldn't default implementation make it easier to use? Just having two lines of code in RMActionController initWithStyle would make it usable 'out of the box' without necessity to subclass.
self.contentView = [[UIView alloc] initWithFrame:CGRectZero];
self.contentView.translatesAutoresizingMaskIntoConstraints = NO;
Hey!
The problem is what a default implementation would be displaying: It would display an empty view with a set of more or less unrelated buttons. Such a control would not make much sense as an UIAlertController can be used for displaying buttons in a similar manner.
Also subclassing offers you a better way to use the generics offered by RMActionController. You can a generic type in the subclass instead of defining it when initializing the RMActionController.
Best regards, Roland
Hi,
Thank you for making this great library. I just have problem, I keep getting the following error:
Error: The view of an RMActionController has been loaded before a contentView has been set. You have to set the contentView before presenting a RMActionController.
Here is my code:
Can you tell me what I am doing wrong here? I just followed your example thats all.
Thanks for your time, Daniel.