Does anyone know how to create a popup menu like the one seen in the mail app on iOS7 which lets you reply, reply all, forward and print? I have been researching it but can't find an answer. I am still quite new to Xcode.
You are after the UIActionSheet. This is a control found within all versions of iOS, but has recently been re-skined for iOS7.
Update: UIActionSheet was deprecated in iOS 8, and instead you should use UIAlertController with the style of actionSheet
Related
In an app I'm working on we have some legacy code that displays timed UIAlertViews at several points in the application. These are alert views that display for a certain amount of time (let's say 2 seconds) before they disappear.
These alert views don't have buttons, just a title and a message. Somehow these alert views worked just fine on iOS 5, 6 and 7, but on iOS 8 the message label isn't being displayed anymore.
Does anyone have a fix for this issue? I should note we're not interested in using UIAlertController, since that class is limited to iOS 8 and we need to support older versions as well.
So my question is as follows: is it possible on iOS 8 to display an UIAlertView with just a title and a message and NO buttons? (PLEASE NOTE: the message should be shown properly).
For anyone still struggling with this issue, I used the following approach:
I created an AlertController class that decided which version of an alert view to use. For iOS 7 and lower will default to the "build-in" UIAlertView. For iOS 8 I resorted to a custom alert view.
There are several custom alert views that could be used to create a modal dialog that displays for a few seconds. I based my custom alert view on the code from the iOS Custom Alert View project. Additionally I fixed the look and feel. Suffice to say, the default look and feel of this project doesn't closely match the iOS 7 / 8 look and feel, especially with regards to the buttons. The pop / hide animation is pretty well done though. Fixing the look and feel involved creating a custom dialog view class that uses -drawRect: to draw lines around buttons. The custom subview will also add it's own buttons.
An alternative project that might have a better look and feel out-of-the-box is SDCAlertView. If I would have found SDCAlertView before starting my work on fixing iOS Custom AlertView, I would probably have saved some time.
I should note I cannot share my code / changes. My employer would not like this at all.
You can try this code for your UIAlert:
let alert = UIAlertView()
alert.title = "Title"
alert.message = "Message"
alert.show()
It should display a UIAlert without a button.
Hope this can help you.
When i saw new iOS 7.0 then i saw clock icon is on running state. So i am curious to know, that can we also make icons dynamically by Xcode?
i googled also about this but didn't found any question or hint on this.
No, we're not able to created animated Springboard icons. The following still applies to iOS7.
Changing Icon per Day
Dynamic icon iOS
I have a document-based app that supports Versions and Autosave. When you click the proxy icon, a popup menu appears like in any other document app, too:
You notice this weird NSMenuItem item? It's not supposed to look like that. In Quartz Composer for example it looks like this:
I don't know why this happens, as I'm not doing anything with the window title or icon. There isn't even an API to customize this popup menu.
It would be great if somebody could help me to get this fixed or at least an idea of what could be the cause of this behavior.
Kind regards,
Fabian
Found a blog post with the solution. This worked for me:
Versions, validateMenuItem: and NSMenuItem
I have an iOS iPhone app for which I need the Action Sheet-style buttons outside of an action sheet. I am talking about these buttons:
I've seen the eBay iPhone app do that and then have that button tinted blue, but I just can not figure out how to do it. I've been pondering and googling for this for quite a few days now. Any help would be appreciated!
I've used pre-built photoshop PSDs in the past to achieve this effect. My favorite so far is http://www.teehanlax.com/blog/2010/06/14/iphone-gui-psd-v4/
You have to create your own view that mimics Apple's action sheet. Here's a really nice post that has helped me to create something similar:
http://www.nearinfinity.com/blogs/andrew_homeyer/display_a_custom_uiview_like_a.html
To make the actionSheet black / transparent:
[actionSheet setActionSheetStyle:UIActionSheetStyleBlackTranslucent];
I have a menulet app with an NSTextView in it. I don't want the app to appear in the dock, so I wrote
<key>LSUIElement</key>
<true/>
in the Info.plist file.
But if this option is enabled, somehow an NSTextView in the menu stops responding at all.
How can I make it respond again? Maybe there are any other ways to hide the dock icon?
Thank you!
IMPORTANT UPDATE: This bug has been spotted only on Mac OS 10.6 and higher
The documentation states that keyboard events are not supported in views that are attached to a menu item (see Application Menu and Pop-up List Programming Topics).
That said, I had no problem creating a minimal sample app without Dock icon and a text view embedded in a status item's menu, so your problem is likely somewhere else. You can download my sample app here.