Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Tonight I found an answer online to moving a TextField object to the front with code. I have a bunch of textFields and as the user selects one of them I have a UIImage alpha change from 0.0 to 0.8 to darken the UIImage, textFields, Lables under so the whole image appears much darker. The goal is to make the selected TextField stand out so I also needed to move the textfield to the front above the UIImage with the changing alpha.

Code:
[[phoneNumberTextField superview] bringSubviewToFront:phoneNumberTextField];

was my solution. I understand this code except for the superview. I have a blank xib window and added a UIView that has a png on it. On top of that I have Lables, TextFields and so on.

Is that superview code referring the the UIView the TextField object is sitting on? I am unsure as to what the superview of a UITextField is referring to?

Thanks
 
I have not read it. I have read other doc's and a couple books on Object-C. I will read through that doc you provided to better understand it, i hope.

Thanks.
 
I have read other doc's and a couple books on Object-C.
Have you read any books on iOS Development? Ones that don't just cover Objective-C but deal with the specifics of programming for iOS (a.k.a. Cocoa Touch)? If so, which books? Please provide titles, authors, and editions. If not, now might be a good time to do so.
 
The book that I read cover to cover was "Learn Objective-C on the Mac". I really enjoyed the "Learn C on the mac" and I have to say the second one was disappointing and full of errors. Also I just took my final for my Java class I was taking at city college and that gave me a good foundation of objects so far.

As far as reading any books for IOS development cover to cover, no. But I am now reading through a book called Beginning iPhone Games Development. It's written for Xcode 3 but I am comfortable enough with Xcode 4 that I work around the differences.

There are some holes in my understanding. Book learning is only good if you understand what you are reading. That's when internet searching is good and this forum for specific questions. I would love to take a class for interaction and to fill in the gaps. But for now it is reading, asking questions and testing out code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.