When I run on simulator ipad mini (which I am using ipad 2 profile) and ipad air it shows the same resolution 1024x768
for UI Kit it might adjust automatically but I
If your question is about retina vs. non-retina then UIScreen has a bunch of methods for querying the screen parameters (e.g [UIScreen scale]).
But if you want to handle the dpi difference (and the related button minimal size) then please have a look at Determine device (iPhone, iPod Touch) with iPhone SDK. Warning though: the list of devices is open, so whenever a new device appears you will have to update your app.