Posts

Showing posts with the label iOS7

iOS7 Messages App Blacks out

Image
iOS7 Messages App Bug. Occurred when i was switching back and forth between Home Screen & App Switcher & the Messages App. I was able to solve this only by removing the app running from the Background.

MKLocalSearch in MapKit from iOS6.1

MKLocalSearch provides a simple way to find local points of interest within a geographic region. Because of its no-hassle webservice integration and tight integration with MapKit , any location-based app would do well to take advantage of it. Usage : MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init]; request.naturalLanguageQuery = @"Hospitals"; request.region = mapView.region; MKLocalSearch *search = [[MKLocalSearch alloc] initWithRequest:request]; [search startWithCompletionHandler:^(MKLocalSearchResponse *response, NSError *error) {     NSLog(@"Map Items: %@", response.mapItems); }];

Playing With the Simple "AVSpeechSynthesizer" API's

iOS7 provides a way to use speech (Kind of text to speech conversion). To create an object, you do as below : AVSpeechSynthesizer *speechSynthesizer = [[AVSpeechSynthesizer alloc] init]; normally like any other NSObject. To let it speak, we need to pass the “ AVSpeechUtterance ” object to it using this API: [speechSynthesizer speakUtterance:/* AVSpeechUtterance object */ ]; So, to create an object for “ AVSpeechUtterance ”, you do as below : AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@“Hey baby!”]; So, Utterance is the one that provides the text which will be spoken by the synthesizer. Also, it has few interesting properties, which could be tweaked based on our need. Like rate, volume, pitchMultiplier, preUtteranceDelay, postUtteranceDelay .  For example to slow down the speech, we could use : utterance .rate *= 0.5 ; whereas, preUtteranceDelay, postUtteranceDelay are used to delay the speech before and ...

Few Other Useful Additions to iOS7

Message UI Framework (Attach Files to Messages) : We have always ben using "MFMessageComposeViewController" to send messages, but we weren't allowed to add images to it. But, after iOS7, you could use : " - (BOOL)addAttachmentData:(NSData *)attachmentData typeIdentifier:(NSString *)uti filename:(NSString *)filename;" this API to attach images to the messages like below : if ([MFMessageComposeViewController canSendText] && [MFMessageComposeViewController canSendAttachments] && [MFMessageComposeViewController isSupportedAttachmentUTI:( NSString *)kUTTypePNG]) {      MFMessageComposeViewController *vc = [[MFMessageComposeViewController alloc] init];      vc.messageComposeDelegate = self ;      vc.recipients = @[ @"sender" ];      UIImage *myImage = [UIImage imageNamed: @"imageName.png" ];      BOOL attached = [vc addAttachmentData:UIImagePNGRepr...

UIKit Dynamics Overview

Yes, now you can have all your UI objects to behave like how objects in a physics environment behave. You can have physics concepts like Gravity, Collisions, springs etc..  added to the UI Objects. Apple updated the UIKit framework (which contains almost all the iOS UI Elements) such that any physics behavior could be added to the UIKit Elements/Objects. Hence,  2d physics engine lies just underneath the UIKit to simulate the real world objects. In order to use UIKit Dynamics, we use " UIDynamicBehavior " to apply different behaviors to objects, which binds to the " UIDynamicItem " protocol, UIView does this already for you, hence any subclass of UIView just works with this. You can even create your own objects binding to the above protocol. After setting/applying all the physics behaviors to the objects that we needed to have, we can provide them to the " UIDynamicAnimator " - think this as the controller of UIKit Dynamics, which handles/calculate...

Delete/Close Multiple Apps from Background on iOS7

If you have been using iOS7 for the past weeks, then you would have noticed the new Multitasking View (HP first introduced this type of multitasking for its Mobile WebOS) that gives a snap of the application. So, if you swipe up an application, the app gets deleted from the background queue. But, what if you want to delete more than one app at a time? Here comes the trick : You can place two fingers on the screen, one on the left app and the other on the right and when you swipe up,  both the apps gets deleted simultaneously, this at least gives you half the time needed to delete the apps.  Also, if your fingers are broader then you can even delete 3apps simultaneously, luckily i could do this easily on my iPhone but find a bit difficult doing it on my iPad.  But, still there is no real way to delete more than 2-3 apps at a time.  Still, Apple didn't provide us with an option to delete multiple apps(as iOS JailBreak Community alone takes advanta...

iOS7 Updates High Level Summary

iOS7 Changes : # Features : * Flat Translucent UI * Airdrop * Control Centre * Notification view changes * Siri Enhancement  * Automatic Updates * Real Multitasking(Copied from HP's WebOS) * Photos app collection view * Inter-App Audio # New frameworks : * Game Controller * Sprite Kit * Multi-peer Connectivity(iBeacons) * Javascript Core * Safari Services # Foundation Framework Changes: * [NSArray firstObject] * NSData - base64 Encoding * NSProgress Class (New class to handles event progress) # Enhanced Frameworks /API's : * UIKitDynamics * Multitasking * Games * Maps * AVFoundation(Videos Zooming added) # Objective C Features :  * Modules. * New return type – "instancetype" (As oppose to "id" datatype).  These are all the changes that i have seen so far.  Will update here i...