When to use Delegation, Notification, or Observation in iOS

Posted on Updated on

Refresh your concepts about Delegation, Notification, or Observation in iOS

Shine Solutions Group

A common problem that we often experience when developing iOS applications, is how to allow communication between our controllers, without the need to have excessive coupling. Three common patterns that appear time and time again throughout iOS applications include:

  1. Delegation
  2. Notification Center, and
  3. Key value observing

So why do we need these patterns and when should and shouldn’t they be used?

View original post 1,691 more words


Beta Builder :: Wireless Distribution of Your Adhoc Archive

Posted on Updated on

Hey .. how’s work going? It’s good Han !!! … good good … So you have done with your release and verified with QA after some bug fixing; That’s great; You done a good job;

Now Its time to share the Adhoc with client; Ok … so what would you do? You will probably generate an IPA and attach it in email along with release notes.. right ??? Or you will upload it over some ftp/dropbox to let the client download and install it via iTunes … han??

Well… orite .. that’s fine.. but you know what? In both cases when client has an IPA file, he/she has to use the iTunes to sync your app in device, and in case he is away from his desk (or wants to reinstall it after deleting the old installation) he is stuck ..

Listen .. you are missing one thing here … when you have IPA files and iOS version > 4.0, you should use the web-based, wireless distribution of Adhoc apps and the ability to embed provisioning profiles right into the IPA bundle; Your test users can now install the builds without ever using iTunes at all; Doesn’t it sound good? Read the rest of this entry »

Thumbnail Based MapView Annotation

Posted on

JPSThumbnailAnnotation is an open source library to customize your MapKit annotation view for displaying image thumbnail  along with title and subtitle.  Here is a quick screenshot from my sample project using this library.



Its free, and open source; You need to download JPSThumbnailAnnotation library from github and drag/drop the directory into your project; You will have following six files in library;

  1. JPSThumbnail.h
  2. JPSThumbnailAnnotation.h
  3. JPSThumbnailAnnotation.m
  4. JPSThumbnailAnnotationView.h
  5. JPSThumbnailAnnotationView.m
  6. JPSThumnail.m


 import JPSThumbnailAnnotation.h and add the following line of code to add one annotation on your map view

JPSThumbnail *faisaMosqueAnnotation = [[JPSThumbnail alloc] init];
faisaMosqueAnnotation.image = [UIImage imageNamed:@"faisalMasjid.jpg"];
faisaMosqueAnnotation.title = kFaisalMasjidTitle;
faisaMosqueAnnotation.subtitle = kFaisalMasjidSubTitle;
faisaMosqueAnnotation.coordinate = CLLocationCoordinate2DMake(33.72976, 73.03698);
faisaMosqueAnnotation.disclosureBlock = ^{ NSLog(@"Faisal Mosque selected"); };
JPSThumbnailAnnotation *annotation = [[JPSThumbnailAnnotation alloc] initWithThumbnail:faisaMosqueAnnotation];
[mapView addAnnotation:annotation];

You are good to go now .. You can download a sample project from here.

Flag Counter

Happy Programming .. (:

Background processing in iOS;

Posted on

Hello everyone;
Hope things are going good around you;

I’m working on an iOS application and facing an issue regarding network calls; Need your kind suggestions incase I’m not doing the thing in right way;

Scenario: I want to download one or more zip files from some urls; The files may have different sizes, ranges from 6MB to 150MB; I’m using ASIHTTPRequest at my network layer;

Read the rest of this entry »

100+ Reasons of App Rejection for AppStore;

Posted on Updated on

What !!! Rejected ?? but why ??? oh Damn it …

After a tiring days and sleepless nights, busy weekends and thoughtful breaks, getting rejection from AppStore is worst; No one wants to see a red label, against his/her app over itunes, saying rejected; There could be many reasons, really they are MANY, 100 plus, and any single of them can ruined your efforts and excitement within a second;

No doubt we all take care of some common points that may lead to app rejection, like purchase transaction out side the Apple’s platform, icon/splash image with proper dimensions etc, but again there are many others too that can be surly neglected without going through the list of possible rejection reasons; Before approaching to AppStore, one responsible authority from development squad (your QA guy, technical lead) should carefully revise each aspect that can stop your app to reach millons of iOS users;

Read the rest of this entry »

Substrings from NSString :: N-FAQ

Posted on Updated on

Hello iOS geeks …

Here is a small tip for getting a substring from NSString;
NSString class provide following methods for splitting a string;

- (NSString *)substringFromIndex:(NSUInteger)from;
- (NSString *)substringToIndex:(NSUInteger)to;
- (NSString *)substringWithRange:(NSRange)range;
- (NSRange)rangeOfString:(NSString *)<em>aString;</em>

Following code will demonstrate itself;

Read the rest of this entry »