Author Archive for Andreas

Page 2 of 2

Create custom activity indicator for your iPhone App

Have you ever dreamed of your own custom activity indicator within your iPhone App? The class UIImageView provides a very useful and simple way to implement such a thing. The only thing you have to do is to:

  • Provide a number of images that reflect your indicator animation.
  • Create a new UIImageView instance and set images and animation duration.
  • Position your custom activity indicator within your current view.

To demonstrate the whole process I quickly created some images (I am sure you will style them better than me) which will serve for our animation.

Continue reading ‘Create custom activity indicator for your iPhone App’

UIImageView Fade-In and Fade-Out (pulsating) Animation

Today just a small code snippet to create a nice fade-in-fade-out (or call it pulsating) effect on a given UIImage. To accomplish this within a UIView you have to do only a few steps:

  • Create a UIImageView containing your image.
  • Create the animation with its properties.
  • Set the animation for the specific layer containing your image.

In words of code you will have to do something like the following:

Continue reading ‘UIImageView Fade-In and Fade-Out (pulsating) Animation’

Jolein iPhone App published

Its done! On 21st, July 2009 we submitted the first iPhone App to the Apple App Store and today it was approved! Our App is called Jolein and is used as a basic management frontend for the stunning Jolein platform.

Jolein Main Menu Currently the Jolein App is only available in german language but further language support is planned. While the Jolein platform is used for efficient staff coordination, resource and qualification managment and service scheduling the associated Jolein App supports following tasks:

  • Overview of staff and easy communication with them
  • Task managment
  • Messaging service
  • Overview of own companies
  • Easy staff coordination and service planning
  • Conflict managment

Over here are some more pictures of the App to get a better imagination for the user interface and the App’s capabilities. On the first screen you can see how a new task for a given employee is created and on the second screen a duty roaster is illustrated for a given company and day.

Jolein Add Task Jolein Duty Roaster

For more information visit the Jolein platform or view the App description within the Apple App Store. Jolein im App Store

Check internet connection on iPhone

People (especially iPhone developers) watch out! If your iPhone app relies on any kind of internet back-end-service, don’t forget to check if the service is available and even more to check if a internet connection is currently possible (for instance there is no network or the iPhone is in flight mode).

If you don’t provide enough information to your users, that your iPhone app needs a valid internet connection or your back-end-service is currently not available, Apple may reject your iPhone App.

You will find several examples how to achieve that at the web. The following code I found several times at stackoverflow.com could be very useful for you:

Continue reading ‘Check internet connection on iPhone’

UIButton in UITableView Footer

Once upon a time, there was a pretty UITableView within my iPhone user interface. This table included some UITableViewCells which were used to provide some information of a specific data record. At this time I thought that it would be nice to have a big red delete button at the end of the table (like we can locate it in the edit mask of the Apple Calendar App).

To realize such a button at the end of the table we can simply use the ability to define our own footer view for each section within a UITableView. The next steps describe how we can do that for a single section.

Continue reading ‘UIButton in UITableView Footer’

UITableViewCell with detail label

Creating some UITableViewCells with a main label and a secondary detail label (as we allready knew from the e.g. settings menu on the iPhone) to show some kind of a selected value isn’t very complicated but annoying anyway. The ways to do that were either to create a label as subview programmatically or you used the Interface Builder to provide a nib file including the cell.

This common task was greatly facilitated by the introduction of the new iPhone SDK 3.0, which now supports a few styles for UITableViewCells (see UITableViewCellStyle for more information). The following example shows how to create such a simple table cell:

//create a cell with the style UITableViewCellStyleValue1
UITableViewCell *cell = [[UITableViewCell alloc]
			 initWithStyle:UITableViewCellStyleValue1
			 reuseIdentifier:@"yourReuseIdentifier"];
 
//the main label will be shown on the left side
[cell.textLabel	setText:@"mainLabel"];
 
//the detail label will be shown on the right side
//in blue color, right-aligned and in a smaller font size
[cell.detailTextLabel setText:@"detailLabel"];

The result of this will be something like that:

tableviewcell_with_detail

Multiple UIBarButtonItems in UINavigationBar

Ever wondered how to place more than one button into a navigation bar in your app? I know it doesn’t look neat at all! The class UIBarButtonItem allows us to initialize a new instance with a custom view. This instance can be used as a kind of a toolbar and you can put as much buttons as you like in there. The toolbar again can be used for the rigthtBarButtonItem or leftBarButtonItem. Please remember:

  • Keep your interface clean and simple and
  • Be consistent with the iPhone Human Interface Guideline

For those guys, who still demand on more than one button on the left or right side of a navigation bar, the following code snippet could be useful.

Continue reading ‘Multiple UIBarButtonItems in UINavigationBar’

Glossy UIButtons (for iPhone)

Sadly, we couldn’t find the glossy buttons which are used e.g. in the UIActionSheet within the iPhone SDK. For this case we made some graphics to get along with that. You will find the images below and you can use them under the creative commons license as mentioned at the end of this post.

Creative Commons License
Glossy Buttons by Andreas Katzian are under Creative Commons 3.0 License.