Archive for December, 2010

23 DecMaking GIF animating on iOS


It is not actually a trivial task at first glance. Standard [aView addSubview:gifView] will not do the job. For that reason Cocoa Touch provides a quite smart UIImageView class which has properties we need to look at. But first of all we need to have all frames from GIF separately.
Do the steps:
1. Open GIF in Preview
2. Choose thumbnail view

3. A little hint here. Select all frames with cmd+A and make the first one unselected. Otherwise you can`t copy frames separately. Than drag selected frames to Resources directory and final task by dragging the first one.

4. Add frames to your project
5. Add the following code in viewDidLoad method

// my GIF consists of 30 frames

int numberOfFames = 30;

NSMutableArray *imagesArray = [NSMutableArray arrayWithCapacity:numberOfFames];

for (int i=1; numberOfFrames > i; ++i)

{

[imagesArray addObject:[UIImage imageNamed:

[NSString stringWithFormat:@"gtp-%d (dragged).tiff", i]]];

}

UIImageView *anImageView = [[[UIImageView alloc] initWithFrame:CGRectMake(40,100,250,188)] autorelease];

[self.view addSubview:anImageView];

anImageView.animationImages = imagesArray;

anImageView.animationDuration = 1;

[anImageView startAnimating];

6. Build and Run
7. See some magic

19 DeciPad and iPhone4 wireframes for inventors

A year ago I composed iPhone wireframes for my self. It really helped me the whole year. But now I feel the necessity to update it. There are 3 reasons I want to update:

  1. iPad – didn’t draw a lot, but things are changed and I need it more and more
  2. iPhone4 – is just a matter of appearance, but not critical
  3. Fileds to make small notes


Before start composing I tried to google on the topic and can’t believe, but I found the job done and the same way I thought about. The first link is 12 prototyping mockup wireframing tools iphone app development , it’d satisfy the most refined taste. BUT. As expirience shows it’s very important to keep all clear on idea/prototyping stage to wouldn’t be distracted by the details.

.. so I continued to search and found very clear solutions from some japanese guys. Sorry, guys, I can’t really read your blog, but found very easy to use your iPad idea Sheet (.zip) and iPhone idea Sheet (.zip). Thank you very much!

Among all wireframes they provide I use two which are very similar to those I was using during the passing year. 4 iphone mockups per page and 2 iPad ones per page.

Make a small step forward, but every day!