Showing posts with label iphone. Show all posts
Showing posts with label iphone. Show all posts

Sunday, 29 September 2013

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, 24 June 2013

UIDocument does not allow you to write strings directly to disk

If you are using UIDocument in your app, always remember that UIDocument doesn't allow you to write strings directly to disk.

You need to package the string value in NSData then you can write it to disk. You can do it using the contentsForType:error method.

Below is a sample code, first check that the string is not NULL :

- (id)contentsForType:(NSString *)typeName error:(NSError **) myError{
    if (!self.stringDocument)
        self.stringDocument = @"";

    NSData *nsDataDocument = [self.stringDocument
                           dataUsingEncoding:NSUTF8StringEncoding];
    return nsDataDocument;
}

written by: infinitywebseo 

Wednesday, 12 June 2013

iOS 7 --> Things that you need to change about your app

 
All the contents on this blog are derived from apple developer website, its just a quick short-list for my own personal use.  I hope you find it useful.


Things I must do:
  • Update app icon to 120 x 120 (iOS 7 - Higher Resolution).
  • Update the launch image to include the status bar area.
  • Support Retina display.


Things I should do:  
Prepare for borderless buttons by moving away from supplying button background images and by reassessing your layout.

Use translucent UI Element & Auto-layout.

View controllers should use full screen layout. Don't use "wantsFullScreenLayout", its deprecated in iOS 7. Instead use the following properties:
  • edgeForExtendedLayout
  • extendedLayoutIncludeOpaqueBars
  • automaticalAdjustScrollViewInsets

For custom animated transitions between views click on --> UIViewControllerInteractiveTransitioning Protocol Reference


Using tint color: In iOS 7 tint is a property of UIView. Specify a tint color for entire app using following line: window.tintColor = [UIColor purpleColor]; By default tint color is nil which means that it uses the parent tint color. 
Remember, its best to change tint color when the app is off screen.


Bars and Bar Buttons barPosition in iOS 7 is a property for identifying bar position. The UIBarPositionTopAttached -----> a bar is at the top of the screen and its background extends upward into the status bar area. 
UIBarPositionTop ------> a bar is at the top of its local context—for example, at the top of a popover—and that it doesn’t provide a background for the status bar. 


Status Bar iOS 7
In iOS 7 You can control the style of the status bar from an individual view controller and change it while the app runs. In order to do it, add the UIViewControllerBasedStatusAppearance key to an app's Info.plist file and give it the value YES.


Navigation Bar iOS 7
Bar Style: by default the translucent property is YES.
Appearance: A one-pixel hairline appears a the button edge.  
Tinting: Use tintColor to tint bar button items.
             Use barTintColor to tint the bar background.


Collection View iOS 7
Collection view supports animated transitions between layouts. Click to read the documentation ------> UICollectionViewTransitionLayout Class Reference

Image View iOS 7
UI Image contains tintColor property and when image uses UIImageRenderingModeAlwaysTemplate mode, tintColor is applied to the image.

Map View iOS 7
In iOS 7 there is a new class called MKOverlayRenderer which you can use to create overlay on the top of map view.


Page View Controller iOS 7
To specify orientation use the following methods:
  • pageViewControllerPreferredInterfaceOrientationForPresentation
  • pageViewControllerSupportedInterfaceOrientations 
Scrol View in iOS 7  
automaticallyAdjustsScrollViewInsets ----> to manage scroll view insets.

written by: infinitywebseo 

 

 


Debt Collection

Debt Collectors

iOS 7 Beta a Quick Overview

iOS 7 Beta has so many bugs but the idea is great, its basically amazing. Can't wait for the final version.




written by: infinitywebseo 

Tuesday, 30 April 2013

What is NSRange?

NSRange is a C Struct,  it used to specify sub-ranges inside strings and arrays.

typedef struct {

  NSUInteger  location;
  NSUInteger lenght;

} NSRange;

Important location value is "NSNotFound".

NSString *myString = @"Hi Every One!" ;
NSString *search = @"Hello";

NSRange range = [greeting rangeOfString:search];

if (range.location == NSNotFound) {

// could not find search in myString

}

written by: infinitywebseo