Is it possible to check inside ViewController class that it is presented as modal view controller?
In iOS5+, As you can see in UIViewController Class Reference, you can get it from property "presentingViewController".
presentingViewController The view controller that presented this view controller. (read-only)
@property(nonatomic, readonly) UIViewController *presentingViewController
Discussion
If the view controller that received this message is presented by another view controller, this property holds the view controller that is presenting it. If the view controller is not presented, but one of its ancestors is being presented, this property holds the view controller presenting the nearest ancestor. If neither the view controller nor any of its ancestors are being presented, this property holds nil.
Availability
Available in iOS 5.0 and later.
Declared In
UIViewController.h