IPhone SDK - UIPickerView selection indicator customization

Hi,
I have a UIPickerView and would like to have the selection indicator to show the units of my selection. This is similar to the Timer app on iPhone. On this app, the picker shows the numbers for hours and minutes and the selection indicator indicates the units (i.e. hours/mins). I want the same effect but have not been able to figure it out. I tried hacking it by constantly changing the value for the current selected cell in the delegate and calling reloadData everytime but the result is ugly and jumpy. I am sure there is a better way to do this.
Any ideas would be appreciated.
Thanks,
loungefan

Yes, that's the way I did it too, although I had to do it programmatically as when I tried to use datepickers, UIPickers in IB, other controls and views did not work properly, so I ended up leaving a space for the picker in IB and did the picker and selection label by hand (with MANY tweaks to get it right).

Similar Messages

  • Problem in set selectedTextcolor in uitableview cell in iPhone SDK 3.1.2

    Hello,
    I set selected text color in uitableview cell using cell.selectedTextColor = [UIColor whiteColor]; for iPhone SDK 2.2.1.
    Now i use iPhone SDK 3.1.2, So for that i make change as per documentation for that i use textLabel properties. But selectedTextColor is not exit.
    So Now for SDK 3.1.2 how to set selectedTextColor?..
    Thank you.

    The textLabel property is an instance of UILabel, so it has its own textColor, textAlignment, and font properties. E.g.:
    cell.textLabel.text = @"foo";
    cell.textLabel.textColor = [UIColor whiteColor];
    cell.textLabel.textAlignment = UITextAlignmentLeft;
    Hope that helps!
    - Ray

  • How to control the movie player in iPhone SDK 2.0?

    Hello, everybody!
    With the third beta version of iPhone SDK I finally played a movie with the example from the manual. But I need to seek in the movie and control the playing process. With the MPMoviePlayerController class this is impossible, because it has four properties (backgroundColor, contentURL, scalingMode, userCanShowTransportControls) and only three instance methods (initWithContentURL, play, stop). The notifications are two (MPMoviePlayerScalingModeDidChangeNotification, MPMoviePlayerPlaybackDidFinishNotification). How can I know what is the current position of the head and how can I change it? I can't find other classes, which can play a movie. Can somebody help me?
    Stefan

    HeoU wrote:
    Hi Tsvyatkov,
    Do you HAVE [these problems|http://discussions.apple.com/thread.jspa?threadID=1486343&tstart=0] while playing video playback?
    - The keyboard doesn't appear after playing the video (It works great before playing the video)
    - When you play the video, iphone simulator turns in paysage mode. Then when you stop it, it doesn't turn back (SDK beta 3). It worked fine with the SDK beta 1, 2.
    - If you chose a video from a list (UITableView) and you stop the video, then come back to the list, the item is still selected with the blue color.
    thanks
    HeoU
    Yes! I have the same problems! And with the older versions of iPhone SDK I didn't.

  • Iphone SDK 3.0 UIKit Error

    Hi I am using iphonesdk_3.0_beta5 SDK. When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1 While compiling my code I get following error
    from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myAppLL_2/myAppPrefix.pch:7:
    In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0 .sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:30,
    /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0. sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollatio n.h:11: error: syntax error before 'AT_NAME' token
    /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0. sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollatio n.h:19: error: syntax error before '}' token
    /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0. sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollatio n.h:21: fatal error: method definition not in @implementation context
    The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?
    The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?

    I've traced this problem to be the compiler version being used. From what I can tell, REDACTED requires GCC 4.2 while iPhone SDK 2.x only works with GCC 4.0.
    Here's a way to fix this.
    In your Target Info, select Build separator and look for the section Compiler Version. Then:
    1. Select the C/C++ Compiler Version
    2. Set the default to GCC 4.0
    3. At the bottom-left control, hit Add Build Setting Condition
    4. On the left, choose 'Device - iPhone OS 3.0'
    5. On the right, chose GCC 4.2
    6. Repeat steps 3 to 5, now with 'Simulator - iPhone OS 3.0' on step 4.

  • IPhone SDK: unrecognized selector

    I'm relatively new to Objective-C/iPhone SDK development. I have an issue that really seems to produce random (or at least nondeterministic) errors, all of which are "unrecognized selector" errors.
    I have a UITableViewController that is populated with table names from a MySQL database. When I select a table name, a second UITableViewController is created to display detailed data. I thought this was working just fine, but I discovered I have problems when I select a certain table name, (detailed results are displayed in second UITableViewController), go back, select the same table name, (...), go back, and select the same table name a third time. The Simulator explodes and gives me an error like:
    * -[UICGColor length]: unrecognized selector sent to instance 0x1050810
    Sometimes it's related to UICGColor, sometimes it's related to CALayerArray. Sometimes it doesn't produce any error at all and just terminates.
    What's also weird is that only some of the table names cause this to happen. Also, if I cycle through several table names (i.e., not select the same table over and over), the app is fine. I would tend to think that maybe something is wrong with my database or MySQL C API usage, but the fact that things are perfectly fine the first and second (and third and fourth and ... and nth for some tables) time baffles me. I'm not using any dynamic method calling either -- just straight
    [ object method: ] syntax, so I'm not sure how it suddenly can "lose" the selector reference that it was perfectly happy to use earlier. As far as I can tell, I'm releasing memory as necessary.
    Any clues why this seems to be so weird and unpredictable? I can provide source if it would help.

    Ugh. Problem solved. I was tampering with autorelease, and it got me into trouble. I had this:
    query = [ [ [ NSString alloc ] initWithFormat:@"...%@", [ [ tableView cellForRowAtIndexPath:indexPath ] text ] ] autorelease ];
    I thought that I should autorelease the "anonymous" object I created. It made sense at the time, but upon thinking about retain/release more closely, it's so clear now.

  • IPhone SDK - Ideas for pop-up menus

    I have a screen where there are quite a few items which are of the multiple-choice type. In other platforms we use a combo box (pick lists) to do this.
    On the iPhone SDK the only thing that comes close is the UIPickerView which is too heavy IMHO.
    Currently i am using a full screen pop-up with a UITableView inside it for the menu items. It is functional but not cool.
    I guess i could create a view which is rendered as a pop-up and add it as a subview to the parent and make it behave like a pop-up menu.
    Has anyone tried do implement one? I would greatly appreciate your ideas on this.
    Thanks,
    -TRS
    -TRS

    "redstonegirl" <[email protected]> wrote in
    message
    news:eo0dfm$k4r$[email protected]..
    > I'm new to this, and I'm wondering if it is suggested to
    use this drop
    > down for a side menu bar. I am considering doing this
    but my menu must be
    > on the side.
    Yes, once you master the tutorial on creating these type of
    menus, you can
    have them as dropdowns, or flyouts (as they are commonly
    called when
    attached to a vertical menu system).
    Nadia
    Adobe® Community Expert : Dreamweaver
    Tutorials |SEO |Templates
    http://www.DreamweaverResources.com
    http://www.perrelink.com.au
    CSS Tutorials for Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/css.html

  • Unable to download Xcode 3.2.2 with iphone SDK (Intego firewall problem?)

    Hello. I logged into Apple's development site, to download Xcode 3.2.2 w/iphone SDK. I clicked on the link and started the download, but I think my firewall is blocking it.
    Which is odd, ContentBarrier is set to DISABLED for my account. I should have full access.
    Are there specific override settings I need to add to a 'trusted sites' entry, despite already having configured my Mac full admin access?
    Thanks!

    HI,
    From the Safari Menu Bar click Safari/Preferences then select the General tab. Where you see: Open "safe" files after downloading, make sure that box is selected.
    Carolyn

  • IPhone SDK installation problem

    Hi All,
    I have a problem installing the iPhone SDK.
    In the installation process, "Installation Type" page, the page you can choose modules either you want to install or not. I see "iPhone SDK" module is listed, but i couldn't select it, it's greyed out and it is not checked by default. So i had to continue like this, after installation, i couldn't open any iPhone sample code at all. XCode said i don't have iPhone SDK installed.
    I downloaded the SDK from ADC days ago.
    I upgraded my mac to 10.5.4, also upgraded iTunes to 7.7
    are there any other prerequisites?

    excuse me i'm quite new to this community.
    you mean the iphone sdk can not be installed on apple's own hardware?
    is apple switching the focus to x86 architecture? are there any background information that i should take a look at?
    appreciate it.

  • IPhone SDK Installation

    Hi
    I just downloaded the iPhone SDK, and was about to install. I already have the latest version of XCode installed.
    During the installation process, I see that the SDK has some common components that are already present with XCode. Would it be a problem if I try to reinstall these components ?
    Or should I select the iPhone SDK component alone and proceed with the install ?
    Any suggestions / advice on this would be great.
    Regards,
    Vinay

    XCode 3.0 comes with Leopard.
    XCode 3.1 comes with the SDK.
    There's a Readme somewhere that tells you about this. It suggests that if you don't want to overwrite your XCode 3.0 then you can specify, during installation, that 3.1 should be installed in a different location.
    Whether there's any harm in replacing 3.0 with 3.1 I don't know, but clearly some people are worried enough about it for the parallel installation to be documented.

  • IPhone SDK 3.1: Problem compiling first Hello World App

    Hi,
    I am new to XCode, Mac OS and iPhone Development.
    I had already installed the earlier iPhone SDK (version prior to the latest 3.1) into my Mac OS 10.6. I was not able to run
    the hello world program through xCode as while opting for Build and Run, the simulator it was giving me an error saying that it cannot find the right SDK.
    I had assumed that the old SDK is not compatible with the new Mac OS 10.6 (Snow Leopard). I had then uninstalled the old
    iPhone SDK using Terminal tool, using the command line given in the xCode uninstall guide.
    Installed the latest iPhone SDK (version 3.1), and then tried to compile the hello world app through xCode. Now I am getting the following error:
    *error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory*)
    I had located the above mentioned directory and could not find the file: "gcc-4.2" as mentioned in the error. Instead
    executable files like "i686-apple-darwin10-gcc-4.2.1" are present there.
    My Project Settings are:
    Project Format - xcode 3.2 -compatible
    Base SDK - iPhone Simulator 3.1
    Compiler Version - System Default (GCC 4.2)
    I am totally confused here, as I don't know how to correctly set up the ENV, as I thought the iPhone installer SDK does that automatically.
    Please help me out.
    Thanks in advance for your time,
    JC.
    Error Messages:
    Build helloworldxc of project helloworldxc with configuration Debug
    ProcessPCH /var/folders/P-/P-zMg0EzHree36VYyqKEvU+TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/helloworldxcPrefix-gylsydenhucpkgfnujlgvzvhfhzd/helloworldxcPrefix.pch.gch helloworldxc_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2
    cd "/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc"
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D_IPHONE_OS_VERSION_MINREQUIRED=30000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1 .sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Deb ug-iphonesimulator/helloworldxc.build/helloworldxc-generated-files.hmap -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/helloworldxc-own-target-headers.hmap -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/helloworldxc-all-target-headers.hmap -iquote /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Deb ug-iphonesimulator/helloworldxc.build/helloworldxc-project-headers.hmap -F/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/Debug-iphonesimulato r -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/Debug-iphonesimulato r/include -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/DerivedSources/i386 -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/DerivedSources -c /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/helloworldxc_Prefix.pch -o /var/folders/P-/P-zMg0EzHree36VYyqKEvU+TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/helloworldxcPrefix-gylsydenhucpkgfnujlgvzvhfhzd/helloworldxcPrefix.pch.gch
    while compiling hellowworldxc_Prefix.pch,
    error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory)

    Could you let me know as where is the xcode setting through which it is looking for the compiler in the following path ? This path is probably wrong (Pls refer to the error messages)
    I'm not sure this will be of any help to you -- I'm not sure if it's the answer you're looking for, since I don't really know enough on the subject. However, this may answer your question, or at least maybe help you find the answer for yourself, so it's worth a shot. Try going to Edit Project Settings in the Project menu, and once the Project Settings open, select the Build tab. Search through this and see if you find any preferences along the lines of what you are looking for. In particular I would try the sections toward the bottom about the GCC 4.0 compiler. Sorry if this was a waste of time, but I wanted to try...

  • Iphone sdk iTunes

    I am a bit new to this forum so I hope not to commit any major faux pas' in this post:
    I am just reading the iPhone sdk documents, and trying to wrap my head around the possibilities.
    I am trying to figure out if there is a way to access the music that the user has on their device. Is it possible to read that XML from a users iTunes directly, or somehow interact with the file system to find all of their music?
    Thanks for any and all guidance. Much will be appreciated and returned.

    Same question. Is there any way to ask the user to select a song that's on the iPhone?

  • Problems downloading iPhone SDK

    I just recently signed up for an Apple Developer account and am trying to download the iPhone SDK. When I start the download it never actually downloads and eventually times out. My problem is also described in these threads:
    http://discussions.apple.com/thread.jspa?messageID=11033796&#11033796
    http://discussions.apple.com/thread.jspa?messageID=11000681&#11000681
    In those threads I have tried the fixes and still been unable to accomplish the download.
    I have tried on computers running Vista and Windows 7 and on my Mac running Snow Leopard.
    On Windows (either one) after clicking on the link it comes up with the file information, I click save, and then the file download dialog opens. No transfer rate ever appears and neither does any indicator that I have downloaded any of the file. Eventually it times out.
    On the Mac I tried downloading with Safari. Safari gets 1.1kb of the file and then tells me it will be many, many years before the download completes and eventually errors out that the server has not responded.
    I currently have a 7 mb DSL connection. I am able to download any other file in the developer release section including X-Code and the Mac SDKs. In fact I have installed both X-Code and the Mac SDKs already and they were fine.
    Other things I have tried:
    1. Multiple browsers on Windows (Firefox, Chrome) with similar errors.
    2. Hooking straight into the modem (normally hooked into wireless N router)
    3. Disabling the modem firewall and Windows Firewall (Macs firewall is off by default. Is that normal?)
    4. using the trick from the other threads of changing http to https. For me it makes no difference.
    5. My work computers (with the same ISP) have no problems downloading the file. However with no disc drive, and with the USB ports disabled that doesn't really help me much. I only tried to see if they would work with my login since another thread suggested some users were being cut off.
    Something else I do not understand is why I have to download the SDK with X-Code. Since I already have the latest version installed it seems like Apple could be saving on bandwidth there. No big deal but just kind of strange.
    Any help anyone could give me would be appreciated.

    Alright it turns out it was actually the DSL modem. Apparently the last major firmware update causes it to have problems downloading specifically from Apple servers. Both iTunes HD content and large downloads from Apple servers are unable to be downloaded. SD content, music, and downloads under roughly 1 gb are unaffected.
    The modem is the 2Wire 2701. I actually managed to find an older modem that worked and downloaded the SDK fine. At this point I am looking around for a new modem just so in the future I will be able to download updates etc.
    Also after a lot of searching it turns out that Qwest doesn't cap their service at all. Even the one report with a limit I turned up turns out that it was either true only back then or was part of a trial that ended. At this point Qwest does not cap at all.
    Take a hint if you are going to respond to a post try to be helpful. If you are not actually going to help troubleshoot don't both.
    But you did use an emoticon. So at least you were useless . . . with style.

  • Settings Bundle localization in IPhone SDK

    The iphone SDK settings bundle mechanism doesn't really work as advertised or as a Localizable.strings does. Selecting Root.strings doesn't allow me to create a translation, and I cannot create a french.lproj folder containing a Root.strings in French.
    Has anyone had more success than I?

    The general issue seems to be that Apple might have changed the Country Abbreviation (e.g. from "en" to "English"). Here is, what solved all issues for me (parts have already mentioned here - Thank you!):
    - Use the long Version (e.g. "English") in your info.plist file for "Localization native development region"
    - Collapse (close) the Settings.bundle entry in XCode
    - Use Finder, locate your development directory and Open "Settings.bundle" with "Open package content"
    - Rename "en.lproj" to "English.lproj"
    - Copy "English.lproj" to e.g. "German.lproj"
    - Go Back to XClode expand (open) the Settings.Bundle entry and it should now contain both English.lpoj and German.lproj
    - If there are problems with XCode accessing these files, try to restart XCode.
    Everything is working now in my case. If I switch from the default language to German, the German content will be used.
    Have fun!
    Marcus

  • Which Macs will run the IPhone SDK

    I Got spooked.
    'Turns out my PowerPC processor won't allow the IPhone SDK to install even though it doesn't give me any message indicating so.
    So I have to buy another machine and want to make sure it will run the IPhone SDK
    How about Intel Atom Processor N270 1.6GHz single core?
    Thank you so much. Answers to other questions have been very helpful.
    Jerry

    Sorry Orange,
    You answered about the duel core. I am now asking about a different machine. I am hoping to get answers about several so that it can also be helpful to others.
    Thanks tod,
    That's helpful. Since I am running 10.5.5 on a real Mac and it won't take IPhone SDK now I am wondering just what will take it.
    So now I know the Intel® Atom Processor® N270 in the Dell Inspirion minis won't.
    Will the IPhone SDK only run in a machine built by Apple and after they started to use Intel?
    Jerry

  • ITunes 9 and iPhone SDK 3.0

    Hi there,
    I downloaded and installed iTunes 9 yesterday by hand since the software update tool didn't have it yet. However during install, he asked me to close my Xcode (v.3.2 with iPhone 3.0 sdk that came with the Leopard Upgrade Disc) and when I fired it up again, the iPhone projects Template section was gone, making me download the whole 2.2 gb for Xcode 3.2 with iPhone sdk 3.1.
    I understand, that the iTunes 9 installation probably removed all traces of the 3.0 Framework but would waiting for proper updates through the Software Update tool spare me from such adventures during future firmware releases?
    Thanks in advance!

    Ok, here is the EXACT thing that I have on my iTunes that is working on my iPhone. (I haven't checked on the Shuffle yet) First screen--iPhone itself--nothing checked except Automatically sync when this iPhone is connected. Now Podcasts Tab on iPhone screen (right side of iTunes--center really--at least not the left side) Checked Sync Podcasts at Top. Also Checked Automatically include ALL episodes of SELECTED podcasts. Now here is where it seems weird. I have NONE of the podcasts themselves checked. Scroll Down further and there is a check box for Includes Episodes from Playlists. I have both of my Smart Playlists checked and they are both working correctly.
    One more thing, I have in my Smart Playlist a rule saying Play Count is 0. That way after I have completely listened to the entire podcast it will be deleted from that playlist. If I am halfway through the podcast--that is saved and it starts playing at that point.

Maybe you are looking for

  • How can I do this in FCP?

    Hi guys! Currently an FCE user, but gonna buy FCP5 tomorrow if I can get a guaranteed way of making this work in FCP! Kind-of reached the limitations of 'Express really... Right then, this is what I wanted to do! I want to create some titles for some

  • Is there a way to select a word in a pdf form and have it circled

    is there a way to select a word in a pdf form and have it circled instead of say check marked

  • Simple question(?): How to read parameters in JSP?

    I am trying to get a parameter passed to my JSP script through an URL like this: http://www.somewhere.com/cgi-bin/myscript.jsp?variable=test How can I read the context of the variable "variable" within the JSP code? The content must be placed in a st

  • FS10N - Missing Material number during drilldown

    Hello In FS10N transaction, g/L Account display screen, when we drilldown on any of the field to see the material number, its missing from the layout. Also, some of the displayed in German Language. I would appreciate your quick thoughts and help SAP

  • Xp won't connect to wpa2-psk security enabled network

    I have 3 laptops, 2 with win 7 premium and 1 with xp home edition, the win 7's will connect to the internet fine...but the xp won't connect at all, now if I turn off the security xp will connect fine, can anyone tell me what my problem is please?  Th