Adding Images to UIActionSheet buttons as in UIDocumentInteractionController

There is a possibility to add images (to be exact: icons or symbols) to the buttons of a UIActionSheet (or a UIAlertView) without loading image files or fiddling around with (sub)views. In these classes buttons are specified by their titles, which are strings. So it is obvious to use symbols, which one can specify also … Read more

iOS share image AND text to WhatsApp

You can use UIActivityViewController to share image , text or URL .Here is a small example : NSString *textToShare = @”Enter your text to be shared”; UIImage * image = [UIImage imageNamed:@”imagename”]; NSArray *objectsToShare = @[textToShare, image]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil]; [self presentViewController:activityVC animated:YES completion:nil]; Run the above code and select whats … Read more

Supporting Open In… menu item in my app for iOS Mail And Safari

I know this was extremely frustrating for me as a beginning programmer, or even as a moderately skilled one now. File I/O through the Mail and Safari apps involves very… interestingly named conventions within the app itself. So let’s get our hands dirty with an Xcode project for iPhone. Open Xcode (I will be using … Read more

I have REAL misunderstanding with MFMailComposeViewController in Swift (iOS8) in Simulator

* * IMPORTANT – DO NOT USE THE SIMULATOR FOR THIS. * * Even in 2016, the simulators very simply do not support sending mail from apps. Indeed, the simulators simply do not have mail clients. But! Do see the message at the bottom! Henri has given the total answer. You MUST — allocate and … Read more

tech