Hi folks,
today something very short and simple. There are two ways to hide your status bar within your iPhone app:
- Programmatically
...
//use this whereever you want
[[UIApplication sharedApplication] setStatusBarHidden:YES
animated:NO];
...
- Configuration of your Info.plist (seen in SDK 3.1.2)
Just add a new line to your "your project name"-Info.plist file and select "Status bar is initially hidden" like in the picture below.

Thats pretty all! Have fun,
Andreas
Today I am going to show how we can add a custom overlay view to the standard iPhone video capturing functionality. First of all I have to say, that since the iPhone OS 3.1 is published, a custom overlay is really simple to achive. There are only a few steps you have to do:
Continue reading ‘Custom video/camera overlay view on the iPhone’
How to set a background image of a UITableView is a very often and common question. Today we will try to answer this.
There are two ways to solve this problem:
- Create a new UIView – lets call the view V – set the background image of V and embed a UITableView – lets call it TV – within V. Now set the background color of TV to
[UIColor clearColor] and do so for all UITableViewCells. Everything seems to work well but you have to handle some tasks (regarding the UITableView) on your own now like deselcting the currently selected UITableViewCell when returning from a prior pushed view.
- The second approach requires less effort but creates a not so pretty side-effect. You can simply create a new UIView, set its background image and send this view to the back of the UITableView. If you do so the background image scrolls with the UITableView. So this solution should only be used if you do not have to many cells, i.e. to create a simple menu screen in a grouped style within your app.
For those guys, implementing the second solution, the following code would be helpful. Put it i.e. in your - (void) viewDidLoad; method or further initialization of your view controller.
Continue reading ‘Set background image of UITableView’
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’
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’
NOTE: this is not a general solution and might not work on every phone or future version of the DKs, but it is still a great way for any prototyping purposes 
Unfortunately the SDK currently only supports a small set of the Bluetooth stack. As we wanted to integrate some of our hardware gadgets (over SPP/RFCOMM) with our Dev Phone 1, we needed to digg a little deeper. So here is what you want to do to get it working.
Continue reading ‘Android Bluetooth on steroids with the NDK and bluez’
So after the first few mini steps into the NDK the first thing you will probably notice missing, is a way to retrieve log messages through logcat. To be able to do this you need to do two things:
Continue reading ‘Android NDK logging’
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’
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:
