开发者

AQGridView iOS Create custom icons (image+label) instead of image

I've just started using AQGridView from Alan Quatermain more specifically, the SpringBoard demo..

The demo shows icons/tiles that consist of a UIImageView. I'd like to know how to u开发者_C百科se a custom UIView instead so that I can have an icon with text/button underneath.

I'm currently trawling through the code with no real luck in finding how my icons are created.

Any ideas/suggestions would be greatly appreciated..

Cheers.


Check out AQGridViewCell and, specifically, contentView property. This is similar to customizing UITableViewCell.


Have you checked out three20's TTLauncherView?

Although it is for the iPhone you might be able to adopt it for the iPad. It allows for an icon with text underneath. Though you might have to hack it for inserting a custom UIView in place of the image and text.

I found iOSGuy's tutorial helpful when working with TTLauncherView.

And here is an excerpt from iOSGuy's tutorial to show little bit about how it is setup/used.

TTLauncherView* launcherView = [[TTLauncherView alloc]
          initWithFrame:self.view.bounds];
   launcherView.backgroundColor = [UIColor blackColor];
   launcherView.columnCount = 4;
   launcherView.pages = [NSArray arrayWithObjects:
     [NSArray arrayWithObjects:
         [self launcherItemWithTitle:@"Google"
              image:@"bundle://safari_logo.png"
                 URL:@"http://google.com"],
        [self launcherItemWithTitle:@"Apple"
              image:@"bundle://safari_logo.png"
                 URL:@"myAppController/myView"]
        , nil]
    , nil];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜