N-FAQ

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

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 »

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 »

How To Find Available Disk Space of iOS Device?

Posted on Updated on

Hello iOS fellows;
Hope life is as much bright as the retina display of iPhone 4S;  (:

Well its a Valentine’s night and I’m writing this blog post at mid night, thinking that may be someone get some benefit with these few lines and saved his/her time to googling here and there; Ahh what a priorities of an engineer; (:
Read the rest of this entry »

Integrate AdMob in iOS Application;

Posted on Updated on

Hello Everyone;
Hope winters are going good around you;

Today’s menu is again simple and short; We’ll learn how to integrate AdMob in an iOS application. I will show you the easiest way to integrate AdMob in the application. So lets start;

Read the rest of this entry »

Daily Git

Posted on Updated on

Hi everyone;

So long its been when I last posted anything on my blog; The reason was again the same, some tight schedules and some other home activities; But Notw I’m back; Say welcome please; (:

Today’s post is simple; Now a days me and my team is using Git for our code management; So here are some git commands for daily usage; I’m not going to describing their usage in details; This post is for busy developer who just want to know the exact syntax of a command for a particular requirement;

So here we go …

Read the rest of this entry »

Getting a Screencapture of UIView

Posted on Updated on

Some times you have to capture a portion of you iPhone application programmatically;
The quickest way is to pass the target view to following method and get its screenshot as an UIImage;

-(UIImage*)captureFullScreen:(UIView*) targetView{
    UIGraphicsBeginImageContext(targetView.view.frame.size);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *fullScreenshot = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIImageWriteToSavedPhotosAlbum(fullScreenshot, nil, nil, nil);
    return fullScreenshot;
}

Read the rest of this entry »