How To Create A Gridview With ‘UICollectionView’ In IOS6 & Above

What Is ‘UICollectionView’?

‘UICollectionView’ is a class introduced in iOS 6 SDK. It helps developers in creating grid view to handle ordered collection of data items using customizable layouts. ‘Collection view’, available in this class is like ‘UItableview’ which supports multiple column layouts.

Getting Started:

Create new ‘.h‘ and ‘.m‘ files to display the images.

In ‘ShowImagesViewController.h

#import <UIKit/UIKit.h>
@interface ShowImagesViewController :UICollectionViewController
{
NSArray *allImages;
}
@property (nonatomic, retain) NSArray *allImages;
@end

In ‘ShowImagesViewController.m

#import "ShowImagesViewController.h"
@implementation ShowImagesViewController
@synthesize allImages;
- (void)viewDidLoad
{
[superviewDidLoad];
allImages = [NSArrayarrayWithObjects:@"pizza.jpeg",
@"sides_img.png", @"sandwich_img.png", @"pizza_img.png",
@"pasta_img.png", @"drinks_img.png", @"pizza.jpeg",
@"sides_img.png", @"sandwich_img.png", @"pizza_img.png",
@"pasta_img.png", @"drinks_img.png", nil];
}
 
- (void)didReceiveMemoryWarning
{
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
- (NSInteger)collectionView:(UICollectionView *)collectionViewnumberOfItemsInSection:(NSInteger)section
{
returnrecipeImages.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionViewcellForItemAtIndexPath:(NSIndexPath *)indexPath
{
staticNSString *identifier = @"Cell";
UICollectionViewCell *cell = [collectionView
dequeueReusableCellWithReuseIdentifier:identifier
forIndexPath:indexPath];
 
UIImageView *allImageView = (UIImageView *)[cell viewWithTag:100];
allImageView.image = [UIImageimageNamed:[allImagesobjectAtIndex:indexPath.row]];
return cell;
}
- (void)collectionView:(UICollectionView *)collectionViewdidSelectItemAtIndexPath:(NSIndexPath *)indexPath{
}
@end

Example of Grid layout using ‘UICollectionViewController

uicollectionview

Conclusion:

‘UICollectionViewController’ creates ‘Grid’/’Tile’ layout much faster and offers intuitive user interface in iOS 6 devices.

Top 7 Expert Tips And Tricks For IOS 6

iOS 6 is the latest Apple OS that runs on every Apple devices. Its features like friendly user interfaces and the convenience of apps, makes it a smarter operating system.  Perhaps you are an iOS guru. Or maybe a newbie to the operating system, but here we present some tweaks in iOS that you probably never knew. We also hope you love them and enjoy the benefit of this post.

  • Your iPhone Can Read To You:

You can enable the speak option for facilitating the iOS device to read aloud a selected text. You can enable it from the Accessibility option.

Never miss an update from us. Join 10,000+ marketers and leaders.

  • Enable Emoji Keyboard:

Add iconographic symbols in e-mails, messages, tweets and other postings. This feature is shipped with every iOS 6 devise and doesn’t require buying a third-party iPhone application. To get this feature select General, International then Keyboards tab from the settings option.

  • Ask Siri To Find Location By Using The ‘In Transit’ Cue:

You can ask Siri to find you an address by adding some extra word like ‘transit’ in the end of the command. For example “give me the direction to Kennedy International Airport via transit”. iOS will open up the maps apps and display the route.

  • Edit Siri Commands:

Sometimes Siri doesn’t understand your words and might interpret into something else. But you can fix this issue after Siri responds that she doesn’t understand what you’re talking about. Tap the speech bubble where Siri keeps a record of what she interpreted, there find your command, edit it and resubmit the request.

  • Limit The Ad Tracking:

Most users find it annoying to get constant Advertising pop-ups. But iOS allows you limit these accesses as well. Under the General option tap About and then Advertising to Limit the Ad tracking.

  • Take Photos While Shooting Video:

iPhone 5 and iOS 6 allows the users to snap photos and shoot video simultaneously. It appears on the screen in addition to the shutter button.

  • Customize Auto Replies For Rejected Calls:

you can tailor specific messages, explaining the situation why you didn’t answer your calls. By default you will get 3 pre-reserved options. However you can customize these pre-preserved messages too.

I’ve worked with the team at Andolasoft on multiple websites. They are professional, responsive, & easy to work with. I’ve had great experiences & would recommend their services to anyone.

Ruthie Miller, Sr. Mktg. Specialist

Salesforce, Houston, Texas

LEARN MORE

At Andolasoft, our iPhone application developers keep their skills updated with the latest technology and iOS releases to match this competitive market. Here we develop engaging iPhone application to meet our customer’s business requirements.

New Features Updates Of IOS 6.1

Earlier this week, out of uncertainty, Apple released an iOS 6.1 update for iPhone, iPad and iPod touch. This update is the first major update to iOS 6, since its launch in the last year. There have been minor updates before this, such as iOS 6.0.1 and iOS 6.0.2, but they were flawed with issues. The features introduced in iOS 6.1 are not necessarily groundbreaking, but as a fix and improvements to its previous mistakes. Let’s take a look at these features.

Never miss an update from us. Join 10,000+ marketers and leaders.

  • ‘Siri’ Integration To Search Movies:

Siri has made it extremely simple to find movies, and then buy tickets from Fandango. It is also required to install the Fandango iPhone application to make this feature actually work.  Movies lovers would find this feature to be an extremely fitting update.

  • Apple Maps App:

Apple has definitely improved its Map App with this update. Some of the previous bugs are fixed but hasn’t been solved completely. Along with this it has also added a prominent ‘report a problem’ button.

  • Music Controls:

There is a newly fashioned Lock Screen Music controls in iOS 6.1. When the home button is pressed twice, the music controls pops up. It has been featured to access the music even if the screen is locked. The control interfaces and theme also go well with the Music app itself.

  • Fixed Wi-Fi Issues:

iOS 6.1 on iPhone 5 has resolved all issues from iOS 6.0.2 update. The network connection seems to be strong and stable.

Along with all these features it has also fixed the issue of unexpected OS boot where as the power management is still not satisfying with this update.

I’ve worked with the team at Andolasoft on multiple websites. They are professional, responsive, & easy to work with. I’ve had great experiences & would recommend their services to anyone.

Ruthie Miller, Sr. Mktg. Specialist

Salesforce, Houston, Texas

LEARN MORE

Andolasoft is a leading iPhone application development company offering a comprehensive range of iOS solutions to our global customers. With expertise in HTML 5, CSS, iOS, iPhone SDK, and Cocoa framework, we develop stunning applications to reach a wider audience. With the release of iOS 6.1 it has facilitated our developers to explore new possibilities for application development.