Sunday, 29 September 2013

Icon and Image Sizes iOS 7

Description
Size for iPhone 5 and iPod touch (high resolution)
Size for iPhone and iPod touch (high resolution)
Size for iPad (high resolution)
Size for iPad 2 and iPad mini (standard resolution)
App icon (required for all apps)
120 x 120
120 x 120
152 x 152
76 x 76
App icon for the App Store (required for all apps)
1024 x 1024
1024 x 1024
1024 x 1024
1024 x 1024
Launch image (required for all apps)
640 x 1136
640 x 960
1536 x 2048 (portrait)
2048 x 1536 (landscape)
768 x 1024 (portrait)
1024 x 768 (landscape)
Spotlight search results icon (recommended)
80 x 80
80 x 80
80 x 80
40 x 40
Settings icon (recommended)
58 x 58
58 x 58
58 x 58
29 x 29
Toolbar and navigation bar icon (optional)
About 44 x 44
About 44 x 44
About 44 x 44
About 22 x 22
Tab bar icon (optional)
About 50 x 50 (maximum: 96 x 64)
About 50 x 50 (maximum: 96 x 64)
About 50 x 50 (maximum: 96 x 64)
About 25 x 25 (maximum: 48 x 32)
Default Newsstand cover icon for the App Store (required for Newsstand apps)
At least 512 pixels on the longest edge
At least 512 pixels on the longest edge
At least 512 pixels on the longest edge
At least 256 pixels on the longest edge
Web clip icon (recommended for web apps and websites)
120 x 120
120 x 120
152 x 152
76 x 76


Designing app for iOS 7

Deference, clarity and depth are the main themes for iOS 7 development. Focus on core functionalities and content and keep the design simple.

Provide clarity:
  1. Use plenty of negative space, negative space make important content more noticeable. 
  2. Let color simplify the UI.
  3. Ensure legibility by using the system fonts. 
  4. Embrace borderless buttons.   

Content is at the heart of iOS 7: 
  1. Take advantage of the whole screen, let content extend to the edges.
  2. Reconsider visual indicators of physicality and realism, avoid heavy UI elements, keep it simple, focus on content and let the UI have the supporting role. 
  3. Let translucent UI elements hint at the content behind them.



Monday, 2 September 2013

REQUEST_DENIED when using the Google Places API


<PlaceSearchResponse>
  <status>REQUEST_DENIED</status>
</PlaceSearchResponse>

I had this problem for a while, and could not find any solution for it on the web. But I did manage to sort it out, if you need a quick fix do the following:

In google api console when creating your key, I chose the server and left the field blank so it allows any IP. Now my api key works perfectly fine.

Key for server apps (with IP locking)
API key:
your api key
IPs:
Any IP allowed
Activated on:  date
Activated by:  you

I did the same for my ios key now it works on all of my ios apps.

Monday, 19 August 2013

What are the popular tags on instagram?

Most popular tags on instagram:


#love #TagsForLikes #TFLers #tweegram #photooftheday #20likes #amazing #followme 
#follow4follow #like4like #look #instalike #igers #picoftheday #food #instadaily
 #instafollow #like #girl #iphoneonly #instagood #bestoftheday #instacool
 #instago #all_shots #follow #webstagram #colorful #style #swag
 
 
 



Wednesday, 7 August 2013

How to get user's current location in your app (iOS programming)

To get current location in iOS:

---> #import <coreLocation/coreLocation.h>
1- Create an instance of CLLocationManager
2- Assign a delegate to the CLLocationManager object
3- Set desiredAccuracy & distanceFilter
4- Call startUpdatingLocation
5- locationManager reports the event to this method ---> locationManager:didUpdateLocations (iOS 6 & Later)


Sample Code:


-----> .h File
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>

@interface infinityViewController : UIViewController <CLLocationManagerDelegate>{

    CLLocationManager *locationManager;
}
@end

----> .m File

#import "infinityViewController.h"


@interface infinityViewController ()


@end



@implementation infinityViewController


- (void)viewDidLoad
{
    [super viewDidLoad];
   
    [self getCurrentLocation];
   
   
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)getCurrentLocation

{
   
    if (locationManager == nil  )
       
        locationManager = [[CLLocationManager alloc] init];
   
   
   
    locationManager.delegate = self;
   
    locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;

   
    locationManager.distanceFilter = 400;
   
   
   
    [locationManager startUpdatingLocation];
   
}


- (void)locationManager:(CLLocationManager *)manager

     didUpdateLocations:(NSArray *)locations {
       
    CLLocation* currentLocation = [locations lastObject];
   
    NSDate* eventDate = currentLocation.timestamp;
   
    NSTimeInterval howRecent = [eventDate timeIntervalSinceNow];
   
    if (abs(howRecent) < 20.0) {
       
       
        NSLog(@"Latitude Value: %+.6f\n",currentLocation.coordinate.latitude);
                   
        NSLog(@"Longitude Value %+.6f\n",currentLocation.coordinate.longitude);
       
    }
   
}

@end

written by: infinitywebseo 

Tuesday, 2 July 2013

Write Objective C code for absolute beginner (Quick Guide)

Objective C is basically object oriented C, its an extend C programming language. So, it has the basic syntax as C, are the primitive types, structures, functions, control flows (if, else, for, ...), pointers, and libraries.

What objective C adds to C ---> Defining new class, instance methods, methods invocations, automatic synthesizing of accessor methods, static and dynamic typing, blocks plus protocols and categories.

Lets start with classes and objects, a class encapsulates the data and defines actions to operate on that data and object is run time instance of the class.

Class extensions in objective C:
  • .h is the header file.
  • .m is the implementation file.
  • .mm is the implementation file if you are using C++ in your code as well.
 .h file:

@interface className : parentClassName

{
    // Member variables

}

 //method declarations

@end





.m file: 

// #import directive is like #include directive in C the difference is that #import directive makes sure // that the same header file never included more than once.

#import className.h

@implementation className
{
   

}

Objective C allows both static and dynamic typing:

className *object1;  // Static typing
id       object2;  // Dynamic typing
NSString *myName;  // static typing
 
 
Methods in objective C ----> Instance Methods and Class Methods
For instance method you need to create an instance of the class first then use the method. But Class Method dose not requires an instance of the class to be receiver of the message.

Instance method declaration is preceded by a minus sign (-). For Class Methods, its a plus sign (+).
 
written by: infinitywebseo 

Monday, 1 July 2013

What is autoreleasepool?

@autoreleasepool {

 return UIApplicationMain(argc, argv, nil, NSStringFromClass([yourAppNameAppDelegate class]));

}

Basically autoreleasepool supports automatic reference counting, which provides automatic object-life time management for your iOS application.

In simple words it just makes sure that objects are around as long as they are needed in your app and not longer.

written by: infinitywebseo