iOS: Warning “attempt to present ViewController whose view is not in the window hierarchy”

You are trying to present a view controller from the rootViewController. In your case I think the rootViewController is not the current ViewController. Either you presented or pushed a new UIViewController on top of it. You should present a view controller from the top most view controller itself. You need to change: UIViewController *vc = … Read more

How to list out all the subviews in a uiviewcontroller in iOS?

You have to recursively iterate the sub views. – (void)listSubviewsOfView:(UIView *)view { // Get the subviews of the view NSArray *subviews = [view subviews]; for (UIView *subview in subviews) { // Do what you want to do with the subview NSLog(@”%@”, subview); // List the subviews of subview [self listSubviewsOfView:subview]; } }

Capturing touches on a subview outside the frame of its superview using hitTest:withEvent:

I have modified the accepted answer’s code to be more generic – it handles the cases where the view does clip subviews to its bounds, may be hidden, and more importantly : if the subviews are complex view hierarchies, the correct subview will be returned. – (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { if (self.clipsToBounds) { return … Read more

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