cocoa-touch

UITableView: How to display more then one detail cell and own custom button

For instance [Course Name (cell title) [Value: 30% (cell.detailTextLabel) [my own custom button here as selector] [Due: April, 2,2010](How can i add this) ...

Why would delaying a thread response fix view corruption?

6 times out of 10 my very simple iPhone app is getting a corrupted display on launch or crashes randomly. But it behaves fine in the simulator. The display corruption looks like mis-colored fonts, out of place font text, wrong background colors, etc. I've found a strange work-around.. when my thread delays by 2 seconds before calling ...

How do I return the entire set / array using NSPredicate?

I'm building a carArray and want to filter the contents conditionally, using an NSPredicate, like so: NSPredicate *pred; switch (carType) { case FreeCar: pred = [NSPredicate predicateWithFormat:@"premium = NO"]; break; case PremiumCar: pred = [NSPredicate predicateWithFormat:@"premium = YES"]; break; default: p...

Executing codes in viewDidLoad

In my .m file : (void)viewDidLoad { [super viewDidLoad]; /* Some codes for picker view and slider */ } I used a button to navigate to second view by using the below code: (IBAction)goToPlay{ [self presentModalViewController: secondViewController animated: YES]; } I used another button to go back to first view by using be...

Is it possible to send database query within a NSUrl request??

Hi i am developing iphone application which connects to a php page using NSUrl request.The php page on the server side ,in turn,connects to the database (mysql) to perform transactions.Till now i was passing only parameters to the actual query on php page which was working fine.But when sending query from iphone end through NSUrl ,e...

Changing CSS on the fly in a UIWebView on iPhone

Let's say I'm developing an iPhone app that is a catalogue of cars. The user will choose a car from a list, and I will present a detail view for the car, which will describe things like top speed. The detail view will essentially be a UIWebView that is loading an existing HTML file. Different users will live in different parts of the wo...

Why is the newline character not working when I draw a string within -drawRect:?

hi, the Newline character is not working in draw rect of UIView? can anyone help? - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); UIFont * f = [UIFont systemFontOfSize:20]; [[UIColor darkGrayColor] set]; CGRect b = [self bounds]; NSString * text = @"hi \nr u"; CGSize sz = CGSizeMake(150,200); ...

UIView: Force viewDidLoad / A way to release an UIView?

Hi! Some important part of my code is running in viewDidLoad and I was wondering is there was a way to unload an UIView so that when my controller calls it again it must go through viewDidLoad again? Thanks a lot! ...

How do I draw or get an image of a ring (donut) chart for use in an iPhone Application?

I want to be able to show some account information in a ring chart. I am able to show this in a pie chart format via Google chart APIs in my iPhone application, but my requirement is to show the information in a ring chart (also known as a donut chart). Does anyone know how to do this? ...

How to load an external view in a NIB?

I have a ViewController that has its own NIB. I would like to embed that NIB inside of another master NIB. How can I accomplish this in Interface Builder and how do I reference it in code? ...

Setting a UITableViewCell accessory type on some cells, but not all

I have 8 cells that are being built in my UITableViewController. I would like to know how I can show a disclosure indicator on the 4th and 8th cells. Right now I am building it in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath though I am fully aware it is going to add a disclos...

iPhone UIScrollView - How to animate scrolling with steady contents?

Hi all, I'm wondering if anyone knows how to prevent the contents of a uiscrollview from moving unsteadily when scrolling manually by setting the content offset. When scrolling by touch the text remains clear and steady. I would like to recreate this by animating with the animated option set to false. I'm using a timer to scroll at a...

(HELP )How to view iphone's build-in album photo programmatically?

How to view iphone's build-in album photo programmatically? Could I get the photo from iphone's build-in album without showing the picker view ? same as default photo album application in iphone. ...

Change a Textview- and TableviewCell row height dynamicly

Hello! This is driving me nuts. I have a TableView with custom cells. My cell contains a editble textview. Is it possible to change rowheight on cell and textview dynamicly (when I editing the textView) ? best regards ...

Using NSURLRequest to pass key-value pairs to PHP script with POST

Hi, I'm fairly new to objective-c, and am looking to pass a number of key-value pairs to a PHP script using POST. I'm using the following code but the data just doesn't seem to be getting posted through. I tried sending stuff through using NSData as well, but neither seem to be working. NSDictionary* data = [NSDictionary dictionaryWit...

Sanity check: UIBarButtonItem crashes trying to perform action

One of my users is reporting a crash on his device, an iPhone 3GS. Other devices of the same type are not reporting similar behavior. He's sent me a crash log and based on reading it, I'm not sure how to proceed. I hope I'm not interpreting the crash log incorrectly but it doesn't look like my action has been called yet. This is how I'm...

Issues dismissing keyboard conditionally

I have an app that has a username and password field. I want to validate the input before the the user is allowed to stop editing the field. To do that, I'm using the textFieldShouldEndEditing delegate method. If the input doesn't validate I display a UIAlertView. This approach works as advertised - the user cannot leave the field if th...

UISwitch within UIScrollview nearly impossible to use....

Hi there. I'm using a UISwitch-Component at the bottom of a view that sits within a UIScrollView. Now the problem that appeared, is that the switch is nearly impossible to swipe because the UIScrollView seems to dominate the userinput. Switching works very well by tapping the switch, but from my point of view, most users "switch" the UI...

viewWillAppear-related problem.

Hi! Without giving you all my code examples, I'll made this quick. Has this ever happened to one of you to get viewWillAppear called only the first time it shows up? I have this problem with all my view. For example: When my app starts, I get to the StartView which is a main menu. (viewWillAppear gets called) then I press on one butt...

Core Data - Calculated Fields

Hi, I Know how to use core data with UITableview but how can I use the NSFetchedController to get calculated fields. Is there an example I can follow? LIke i want to go through all the NSManagedObjects and then add its "mark" field but can this be done in easier way or do I have to do it all manually. Thanks ...