Browsing articles in "IOS"
Jan
26
2012

Customize UISearchBar Background Image

custom-uisearchbar

In this post, I’ll walkthrough how to customize the background of UISearchBar. In order to customize the UISearchBar, first we need to know it’s subviews. We can get the subviews by running the code below: for (UIView *subview in [searchBar subviews]) { NSLog(@"%@", [subview class]); } If you run the code above, and you are running IOS 4.3 and above, you should see two subviews “UISearchBarBackground” and “UISearchBarTextField”. So, we know that UISearchBar consist of [...]

Jan
26
2012

O level POA iPhone App

POA-1

New iPhone app released on Chinese New Year, Jan 25, 2012. App name: O Level POA Description: Learn GCE ‘N’ and ‘O’ Level Principles of Accounts by reviewing the notes specially designed for Secondary 3, 4 and 5 students in Singapore. You will be able to read full notes of all topics and test yourself by attempting on at least 10 multiple-choiced questions per topic. Correct answers will be marked in green while wrong answers [...]

Jan
17
2012

UILabel With Different Style Text

ohattributedLabel

There are situations when we need to style a UILabel differently for each text. This can be done by using NSAttributedStrings. Thanks to the library OHAttributedLabel, you can achieve the styled NSAttributedStrings easily under one UILabel. In order to use the library, you must first import the CoreText Framework. In the example below, I style the label so that the text are splited into 2 different colors. OHAttributedLabel *label; NSString *txt = @"page (1 of [...]

Dec
19
2011

Customizing UINavigationbar

custom-uinavigationbar

Before IOS 5.0, UINavigationbar can be customized by using ‘Category’. On IOS 5.0 onwards, customizing with ‘category’ doesn’t work anymore, instead we can use a new API called: – (void)setBackgroundImage:(UIImage *)backgroundImage forBarMetrics:(UIBarMetrics)barMetrics In order to customize UINavagationBar for both IOS 5.0 and below IOS 5.0 devices, we have to prepare these two methods: 1. Write a category for UINavigationBar (for IOS 4.3 and below) 2. Check if device is IOS 5.0 and above, use – [...]

Dec
7
2011

Modify XCode 4.2 Project Template

xcode-template

In this post I’ll show you how to modify the XCode 4.2 Project Template. When we create a new project in XCode, we can choose which project template to use. However, some project templates provide an options to use Core Data while some not. To enable the Core Data option in a project template, we need to modify the ‘TemplateInfo.plist’ which you can find at: Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Application/(Application Type).xctemplate/TemplateInfo.plist For example, by default my Tabbed Application [...]

Dec
6
2011

QRCode Reader With ZXing Library

QRCode

ZXing is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. In this tutorial, Im going to show you how to make a small modification to the library so that the QRCode reader can read from image as well instead of just camera. First of all, download the ZXing-1.7.zip. After you unzipped it, look for the folder ‘iphone’ -> ‘Barcodes’, this is the sample project we will be [...]

Pages:123»

Ads

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Facebook Page

Categories