I have a problem with the app I'm working on. This image will explain what.
As you can see, the "low battery notification prompt" appears under the date picker. This also happens when I have an action sheet active on display in my app and then a "new message prompt" appears when somebody texted me. In my code i called the action sheet to display in view.
[self.view addSubview:datePickerView];//Where I add date picker
[actionSheet showFromTabBar:self.tabBarController.tabBar];//Where I add the action sheet
In action sheet I also tried
[actionSheet showInView:self.view];
I don't have an idea how to fix this since Im new in iOS. I hope one can help.
Thanks!
Related
We have developed chat application and in that app there is one feature of file sharing like whatsapp, Its all working fine in up to iOS9.x, but when I test it in iOS10, google drive option immediately disappear.
That is what I am trying to describe in the case
Tried to send a file,but the google drive dissapear before I even get to select it.
Here is the steps taken before the bug happens :-
•On chat
•Select "Send File"
•Select "More"
•Able to see "Google Drive" for half second before it dissapear(See Attached photo) Options
But up to iOS9.x we there a option of google drive. I search lot on google and on Stackoverflow but Can't find any solution about iOS specific.
we write following code for this:
UIDocumentMenuViewController *documentProviderMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:#[(NSString*)kUTTypeCompositeContent] inMode:UIDocumentPickerModeImport];
documentProviderMenu.delegate = self;
documentProviderMenu.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentProviderMenu animated:YES completion:nil];
new edit:
I get one thing, its hide by UIDocumentMenuViewController because see in second image, if I drag row upside then its appear and google drive available in row number -1. If I re arrange it then I can get it in second row, but first row is disappear by default (not displaying in the screen).
I apply following things but not succeeded.
http://www.openradar.me/radar?id=5065803028234240
http://openradar.appspot.com/19385063
http://www.openradar.me/radar?id=6144449704886272
http://openradar.appspot.com/radar?id=6144449704886272
Please any one tell me what is the issue? Thanks in advance...
I have also faced the same issue. I was able to solve the issue by making navigation bar translucent. You may also use
UINavigationBar.appearance().isTranslucent = true
This appears to be a bug and there is also a similar issue reported here http://www.openradar.me/24564847
I'm new to iOS development, learning bits and pieces.
I've few more queries in continuation to another thread (iOS7: How does Apple make a navigation controller look like a uiactionsheet in the calendar app) on iOS 7 new event creation in default calendar that's shown when we click + on UINavigationBar (I assume).
Does anyone know how to create UIDatePicker so that its displayed/hidden when I click on Start/End date field? I saw one video where UIActionSheet was used in XCode 4.5, but in that user needs to click on Done etc button to hide it. In iOS 7 calendar its hidden when I click outside picker i.e. on Start Date field. I hope question is clear?
Kindly advise how to achieve this feature?
You can try and use the OCCalendarController, Its so simple and comfortable. Just download the zipped file and get all the files named after the prefix OC.
Of which in OCCalendarViewController.m you can make the necessary changes by adding Okay or Cancel buttons programmatically, yourself.
To call the calendar view in your main file use the lines,
//Here's where the magic happens
calVC = [[OCCalendarViewController alloc] initAtPoint:CGPointMake(150, 50) inView:self.view]; calVC.delegate = self; [self.view addSubview:calVC.view];
Also do include the following delegate to receive the date selection(if the user selects a date or date range)
- (void)completedWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate {
Finally you can also customize the arrow(which appears along with the calendar view) by using the code,
[OCCalendarViewController alloc] initAtPoint:insertPoint inView:self.view arrowPosition:OCArrowPositionRight]
Rest of the details can be found on the read me file. Try out yourself, It'll work like a charm.Cheers!
My open source project HSUDatePicker may help you.
https://github.com/tuoxie007/HSUDatePicker
I am seeing a small (but really annoying) difference between iOS 7 and 8 concerning UIActionSheet. In iOS 7, the button that the user taps in the action sheet is selected immediately, giving prompt visual feedback of which button was pressed. (By "selected" I mean the background color of the button changes.) However, in iOS 8 the button does not visually appear selected unless the user taps and holds an action sheet button. Since a normal tap is typically very brief (and not held), this has the effect of the button usually never looking selected in an iOS 8 action sheet.
What the user sees after tapping Option 2 in iOS 8: no selected button as the dialog does its close animation.
If the user taps and holds Option 2, the button finally appears selected. This is also what the user would see immediately after tapping in iOS 7.
UIActionSheet usage:
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:#"Option 1...", #"Option 2", #"Option 3", #"Option 4",
nil];
[actionSheet showFromBarButtonItem: myView.optionsButton animated: YES];
Please note that the action sheet otherwise functions as expected. The appropriate action call is made, etc. The issue is only the lack of visual feedback of the button press.
I know that UIActionSheet is deprecated in iOS 8, however, I have tried using UIAlertController with the same results. This seems to be an OS-wide user interface decision.
In iOS 7, there is immediate visual feedback when tapping an option in an action sheet. Is there anyway to get this behavior back in iOS 8?
Edit: The action sheet button in Mail in iOS 8 demonstrates the behavior. This is the Reply/Forward/Print button. Tapping an option does not give visual feedback, but tapping and holding the option does.
I'm new to iOS development, learning bits and pieces.
I've few more queries in continuation to another thread (iOS7: How does Apple make a navigation controller look like a uiactionsheet in the calendar app) on iOS 7 new event creation in default calendar that's shown when we click + on UINavigationBar (I assume).
Does anyone know how to create UIDatePicker so that its displayed/hidden when I click on Start/End date field? I saw one video where UIActionSheet was used in XCode 4.5, but in that user needs to click on Done etc button to hide it. In iOS 7 calendar its hidden when I click outside picker i.e. on Start Date field. I hope question is clear?
Kindly advise how to achieve this feature?
You can try and use the OCCalendarController, Its so simple and comfortable. Just download the zipped file and get all the files named after the prefix OC.
Of which in OCCalendarViewController.m you can make the necessary changes by adding Okay or Cancel buttons programmatically, yourself.
To call the calendar view in your main file use the lines,
//Here's where the magic happens
calVC = [[OCCalendarViewController alloc] initAtPoint:CGPointMake(150, 50) inView:self.view]; calVC.delegate = self; [self.view addSubview:calVC.view];
Also do include the following delegate to receive the date selection(if the user selects a date or date range)
- (void)completedWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate {
Finally you can also customize the arrow(which appears along with the calendar view) by using the code,
[OCCalendarViewController alloc] initAtPoint:insertPoint inView:self.view arrowPosition:OCArrowPositionRight]
Rest of the details can be found on the read me file. Try out yourself, It'll work like a charm.Cheers!
My open source project HSUDatePicker may help you.
https://github.com/tuoxie007/HSUDatePicker
I've been looking for hours to solve my problem. Right now my program is set as a page control with a UIScrollView. So I looked at a tutorial on adding an in-app email (http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/).
Everything works out well until I want to cancel an email, or send the mail, the log says it did the method fine, however when i do the
[self DismissModalViewControllerAnimated:YES];
it will dismiss to the mainwindow.xib, however, I want it to dismiss back to the secondcontrollerview where the email function and button resides obviously.
What am i missing? Hope someone could help ^-^,
simply .. if you are present your mailController from seconedControllerView your app will return back to it when you dismiss the mailController.