Friday, November 2, 2012

Curl view animation using UInavigation controller

This small post is about creating custom curl animation same like mapview using UINavigation controller rather than UImodalViewController.


Function to go on next view :


- (IBAction)fnButtonForMapViewPressed:(UIButton *)sender {
    

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration: 0.50];
    
    
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:YES];
    
    //Create ViewController
    vc *vc_obj=[[vc alloc]initWithNibName:@"vc" bundle:nil];
    
    [self.navigationController pushViewController:vc_obj animated:NO];
    
    //Start Animation
    [UIView commitAnimations];


}


Function to go back on previous view :

- (IBAction)fnButtonForBackButtonPressed:(id)sender
{
    
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration: 0.50];
    
    
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:YES];
    
    [self.navigationController popToRootViewControllerAnimated:NO];

    //Start Animation
    [UIView commitAnimations];

}


To provide better illusion add curl image to button.

Njoy..Happy Coding

Tuesday, July 31, 2012

Scroll to top of UITableView by tapping status bar

Hi,

This is really a small thing but very important if you see by the perspective of good UI. Just like an apple native apps when you tap on status bar it will load zero'th index of tableview or we can say scroll to top.

It's just a sing line of code :

TableViewObj.scrollsToTop=YES;

Happy Coding :)

Monday, July 9, 2012

iPhone vs Android Phones

    Many time i come across situation that while interview of iPhone or Android development interviewer will ask question like Tell me 5 differences between these two and every candidate will get hang on this question. Today morning i read one description of one job post where they directly mention that " You must know 10 differences between iPhone and Android".

Just to help my all job seeker friends i am writing this blog post.



1) Closed systems vs. open systems

iOS is developed by apple, and is a closed source mobile offshoot, based on the Mac operating system, optimized for a mobile device

Android is an open source Linux based operating system developed by Google, optimized for mobile devices


2) Security

iPhone has More security. You can blindly rely on iPhone for your data security and other factors.

Android has less security than iPhone

3) User Control

iPhone has better user interface and UI is really easy to use.

Android UI is also good but not that much appealing

4) Vendor Lock-in

iPhone comes up with vendor lockin like AT&T or verizon. Now a days they are allowing unlocked phone but cost is too high.
You can use android phone with any carriers.(ie Open to carriers)

5) Battery Life

iPhone is having better battery life but battery is not replaceable.

Now a days few android phones are also having good battery life but not that much of iPhone but you can replace battery.

6) Memory

iPhone comes up with inbuilt memory device. (8GB,16GB,32GB,64GB)

In android phone mostly we use SD-cards which is main root cause to data leakage and virus infection.


7) Google Integration

iPhone is having limited Google integration. In ios6 they have moves Google Maps too.

Android is having all Google product integrated in phone right from Google maps to Google voice.


8) Hardware support

Apple controls all of its hardware, and it is therefore simple to perform the necessary accessory maintenance.

Google’s Android is simply a platform that functions on different platforms, and doesn’t allow for easy accessory support.

9) Cost

iPhone is more expensive than other smartphones in the market except you are purchasing it on contract.

In Android phone you are having lot of varieties available in different price range.

10) Phone Screen Size and Quality

The iPhone 4S has the superior display right now in terms of detail and brightness.

Android phone just come up with a larger screen but not that much quality.

11) Device Camera

The iPhone 4S has the best camera we’ve used yet.

Android phones camera is not that much effective but give you more control of your images—before and after the shot.


12) Developer support

Apple having really state-of-art development tools with proper documentation which will ease life of apple developer. Only thing is that they are having limited access to the resources or we can say device.

Tools available for android is also good but not that much appealing when we compare it with Apple tools.

13) App Market Policy

Apple is having very strict app approval policy, many time it will take a week or two to review and approve the App on app-store which will maintain quality of app.

Google market approval process is not that much strict and app will get approved within 2-3 days.










If you guys want to add more into this please add it in comment.

Thursday, June 21, 2012

Pass Type IDs in iOS 6

As apple announces their iOS 6 OS they have launch new option called "Pass Type IDs". Same day it has been listed in my apple developer account pane. I am trying to know what it is but cant get more on it.
The only information shared by apple is :

Passes are a digital representation of information that let users take an action in the physical world, in the same way as boarding passes, membership cards, and coupons. Pass Type IDs define a class or category of passes you wish to offer.

You must register your Pass Type identifiers in order to generate Pass Certificates which are used to digitally sign and send updates to your passes. 


I have updated our iPhone to ios6 beta and one more app is new there called "Passbook" where you can save your passes and coupons, etc.

I found some good article where you come to know about passbook programming :

http://www.futurechips.org/thoughts-on-latest-happenings/generating-passes-ios6s-passbook.html

Following is the repository where you can found a PHP code to create passes on the fly.

https://github.com/tschoffelen/PHP-PKPass

Saturday, June 16, 2012

How to make your iOS app UI appealing? Part 1

Now a days apple is releasing their iOS version after every 6 month with having lots of drastic changes. Apple is also concentrating more on UI along with the functionality of iOS so that user can get feel of retina display device.

In other case app like Foursquare, Path, Google places , Quora, pintrest and many others are also presenting Neat and clean UI. The reason behind this is user will get attracted more toward UI not toward functionality. Functionality is the part which is important from developer point of view but user want something different everytime.

In my iOS career i have also developed some good UI appealing app and now want to share some key element which need to taken care of while designing app like this.

1) While starting for any app first clear its requirement, and try to draw that requirement in terms of wireframe by using software like Balsamiq and other. which will give you more clear app development idea and also your client knows that what he will be getting after few months.

2) Try to use .xib rather than using Programmatic way to add controls on view.

3) Check with your graphics designer that he is designing images for you in Retina display size. and also confirms what dpi he is using for rendering this images.

For iPhone and iPod touch launch images, include the status bar region. Create launch images of these sizes:
  • 320 x 480 pixels
  • 640 x 960 pixels (Retina Display) - 180 ppi
For iPad launch images, do not include the status bar region. Create launch images of these sizes:
  • For portrait:
    • 768 x 1004 pixels
    • 1536 x 2008 pixels (Retina Display) -252ppi
  • For landscape:
    • 1024 x 748 pixels
    • 2048 x 1496 pixels (Retina Display) - 252 ppi
 You can get more details on this from developer.apple.com by using your developer account.

4) Before starting designing exact view controllers first decide the button size that you want to use in your application. keep the button or other control ratio same on every view of your application so that user will get feel of navigating in same app.

5) Try to use default controls provided by apple if you don't have graphics for application.

6) Try to use custom controls if you have really clean and neat graphics available.

7) Try to concentrate on one factor where all developer will get confuse i.e. Auto resizing views, which will help you to place controls at some specific location.

8) Whenever you are trying to deal with large number of sequential data coming from server try to use UITableview to represent it. UITableview is having lot of customization methods which will help you to design good UI.

9) Avoid excessive use of UIScrollview in your application which will increase user confusion.

10) Try to reduce number of activity indicator in your application which will lead bad user experience.
 
In next post i will try to explain on particular custom controls which will used by all popular apps along with these tips.

Keep Coding..