iOS – How to check if a modal view is present

Are you checking the presence of a modal view controller from the parent view controller? If so, you can just check that view controller’s modalViewController property:

BOOL modalPresent = (self.modalViewController);

If you want to check for a particular modal view controller, you can get the modal view controller’s class name like this:

NSString *modalClassName = NSStringFromClass([self.modalViewController class]);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)