The view customization:
As UIAlertController shows in iPad in popover style. Is it possible to show alert as popover within iPhone devices as well?
Related
I have a custom view and want to add in UIActionSheet as subview but in iPhone successfully added but when I try to add in iPad they show successfully but not show on the actionsheet as subview rather show on the top of the screen. look ipad screen short
iphone screen short
I am trying to implement my own alert view for an iphone app. The app supports all orientations and also often shows both a tabbar and navbar. Currently, I add my custom alert view as a subview of the active view controller - this works well as it supports a transparent overlay and rotation is supported. However, the tabbar and navbar are not covered by the alert view's overlay. I have discarded adding the alert to the keywindow as this does not support rotation readily and because of other issues with using the keywindow. Any suggestions on how to implement a custom alert with a transparent overlay that would also cover any nav and/or tab bar and also support rotation please?
I have a similar problem as stated in this thread: iPad UISplitView initial state in portrait: how to display popover controller widget?
The issue is that when my app starts in portrait mode the button for the masterview of the splitview does not show. In the thread mentioned above the solution was to porgrammatically assign the splitview as the window's rootviewcontroller.
For me this will not work as I have my splitview within a tabbarcontroller and that is the rootviewcontroller. Furthermore I have another splitview under a different tab and that has the same issue.
When I rotate the iPad to landscape and back the button appears, but I have to do that for both tabs individually. Also, the button only appears on the device not in the simulator.
Does anyone have a way to trigger the splitViewController:willHideViewController:withBarButtonItem:forPopoverController: ?
I am working from a storyboard in iOS 5, iPad only.
Edit:
After thinking about this again. I realized what I was trying to do was use a modal view controller on the iPad. I was under the impression that according to the HIG, I couldn't use a "done" button in a popover. I obviously need a "done" button on the iPhone but I am trying to handle that modal view in a popover.
yes its possible
create one complete code in iphone size view control.
now when you want to show on that find the device
Example
you create one controller name mytable.m,.h and .xib in iphone size
one button click you want to show this mytable view
button click event is
-(void)btnshowtableclick:(id)sender
{
NSString *deviceType = [UIDevice currentDevice].model;
if([deviceType isEqualToString:#"iPhone"])
{
//navigate to that screen code
}
else
{
//show popover
}
}
Determine device (iPhone, iPod Touch) with iPhone SDK
Apparently using a "done" button to dismiss a modal view controller is allowed since I can set the modalInPopover property and add my "done" button to the navcontroller bar.
I am developing an Ipad application. It supports both landscape and portrait mode.
The app has keyboard.It also shows an action sheet with 4 buttons when required.
In portrait mode it works perfectly. But in landscape mode action sheet only show 2 buttons
when keyboard is there .Without keyboard it show all 4 buttons.
any solution?
If the actionsheet doesnt have a textfield or anything to type in, dont display the keyboard. If you need the keyboard after you dismiss the actionsheet, then display the keyboard in your actionsheet dismiss delegate.