Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-31-2012, 03:23 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 2
iOSguru is on a distinguished road
Cool Any Customized UI for UITextField and UILabel?

Here is a UI for iOS I am looking for:

In a view of my application for iOS, a user is asked to fill out all underline blanks in not fixed number of distinct questions of the following form(for example):

My ID is _ _ _ _ and telephone number is _ _ _ - _ _ _ _.

Since questions are not fixed, UIText is not enough to use for my requirement. I spent three days on finding proper UI control and view but did not find it.

Is there any UI control and view for my requirement? If not, I need to build some my own UI control and view using UIKit. Could you recommend any good reference for building customized UI using UIKit? Any suggestion would be very welcomed. Thank you.
iOSguru is offline   Reply With Quote
Old 01-31-2012, 03:31 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 194
mavrik5150 is on a distinguished road
Default

Have you considered using a UITableView in which you can have the question in the Cell and then a UITextField as the accessory view? You probably already know before that view is called how many questions should be shown on that screen so then you can just use a loop to create a cell within the table view for each question you need to show the user.
mavrik5150 is offline   Reply With Quote
Old 01-31-2012, 06:46 PM   #3 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by iOSguru View Post
Here is a UI for iOS I am looking for:

In a view of my application for iOS, a user is asked to fill out all underline blanks in not fixed number of distinct questions of the following form(for example):

My ID is _ _ _ _ and telephone number is _ _ _ - _ _ _ _.

Since questions are not fixed, UIText is not enough to use for my requirement. I spent three days on finding proper UI control and view but did not find it.

Is there any UI control and view for my requirement? If not, I need to build some my own UI control and view using UIKit. Could you recommend any good reference for building customized UI using UIKit? Any suggestion would be very welcomed. Thank you.
So you need to create a custom sentence with user-entered blanks at arbitrary points? The underlines in your example show a sample data entry field, but there might be others, like

My name is _______ ________, and I am __ years old.

Is that right?

You could build a collection of views through code. Create UILabels for the static text and UITextField objects for the input data.

You could use the text for the labels to calculate how wide they need to be, and use maximum input size to size the text fields.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 01-31-2012, 08:36 PM   #4 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 2
iOSguru is on a distinguished road
Smile

Quote:
Originally Posted by Duncan C View Post
So you need to create a custom sentence with user-entered blanks at arbitrary points? The underlines in your example show a sample data entry field, but there might be others, like

My name is _______ ________, and I am __ years old.

Is that right?

You could build a collection of views through code. Create UILabels for the static text and UITextField objects for the input data.

You could use the text for the labels to calculate how wide they need to be, and use maximum input size to size the text fields.
Thank you very much Duncan for your suggestion. For one more question about your idea, suppose I know the number of letters(or characters) which is same as that of small underlined blanks in each question, say 50 letters. Then, if I want to use 50 UITextField objects for each question, do you think it is quite heavy or a waste of computational resources for iphone?
iOSguru is offline   Reply With Quote
Reply

Bookmarks

Tags
uikit, uilabel, uitextfield

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 420
16 members and 404 guests
Atatator, chiataytuday, condor304, dre, FrankWeller, imac74, ipodphone, jeroenkeij, kukat, LunarMoon, n00b, PowerGoofy, QuantumDoja, Retouchable, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,675
Threads: 94,124
Posts: 402,909
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Retouchable
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0