iphone

Assertion failure when trying to write (INSERT, UPDATE) to sqlite database on iPhone.

I have a really frustrating error that I've spent hours looking at and cannot fix. I can get data from my db no problem with this code, but inserting or updating gives me these errors: *** Assertion failure in +[Functions db_insert_answer:question_type:score:], /Volumes/Xcode/Kanji/Classes/Functions.m:129 *** Terminating app due to un...

UIProgressView not updated

Hello, I have a UIProgressView that I am trying to change the progress but is is never updated. My "slow" operation is done from a NSoperation/NSOperation queue so it should be multithreaded. Did you already experienced this or do you have any idea to solve this? Thanks :) ...

Escape string value for plist with php

How can I escape a string containing random characters with php for a plist file? htmlentities() seems doesn't seem to be strict enough. For example: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; <plist version="1.0"> <string><?php echo...

Using UITouch inside a UIScrollView

Hi all, Just toying with the SDK and I was wondering if possible a UITouch event can work inside a UIScrollView. I have setup a UIScrollView which handles a large UIView, inside the UIView is a UIImageView, I've managed to get the UITouch to drag the UIImageView outside of the UIScrollView but inside it's not registering the event. I ...

Is it valid to ignore an return value of an method in objective-c?

For example, when I call a method that returns an value, but I'm not interested in this at all, can I safely ignore that? Example, instead of: CGSize size = [str sizeWithFont:myFont minFontSize:19.0f actualFontSize:&actualFontSize forWidth:150.0f lineBreakMode:UILineBreakModeClip]; ...do this: [str sizeWithFont:myFont minFontSize:19...

allocating and dismissing UIAlert w/spinner animation: crashes sometimes, doing it wrong?

I'm creating an alert dialog with a spinner graphic. UIAlertView *alert; //(at top of controller) alert = [[[UIAlertView alloc] initWithTitle:@"Looking for someone to connnect to via WiFi" message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil] autorelease]; [alert show]; UIActivityIndicatorView *indicator = [[UIActivi...

Problems with empty table view

Hi, im trying to write an app that will display a list off lines from a book e.g line 1, line 2 in a table view and you can then select a line to view the corrosponding text. I've got to the stage where the text should at least appear in the table view(not as far as being able to select it), yet it remains empty. I used the debugger a...

iPhone plist data, large amounts of text and return key?

Basicly iv built my app using a plist. But with the data there is a few times when I need to press return and start a new line. The return key doesn't work in the plist. If I did it the older way it would be \n\n but that doesn't work either. Is there a obvious way I'm overlooking? Or will it be a case off just pressing the space bar al...

php library iPhone

I'm wondering if anyone knows of a PHP library that I could compile into my app for the iPhone? Basically I'm wanting to allow the phone to display pages stored locally that have PHP in them and display them in a UIWebView. ...

get iphone window background color

I've been looking at the Stanford University iphone videos on iTunes U. And saw the teacher trying to do something similar to this code but he realised and said it didn't work though I didn't get why: - (IBAction)flashPressed{ if (window.backgroundColor == [UIColor magentaColor]){ window.backgroundColor = [UIColor redColor]; }else { ...

iPhone visualizing math pattern

Hi, I'm toying with an app idea for the iPhone but I don't know where to start or even what to look for in google :) I'd like to visualize math patterns on the iPhone, similar to this http://itunes.apple.com/us/app/patterns-lite/id304565312?mt=8 ... If someone could point me into the right direction then that would be fantastic. Original...

Problem with using Kal Calendar [iPhone Application]

Hi . iam using Kal calendar from http://github.com/klazuka/Kal i want use this calendar on my app : so i add Kal Folder to project , the developer said if you want create basic calendar just add these code to your project : KalViewController *calendar = [[[KalViewController alloc] init] autorelease]; [self.navigationController pushViewC...

json-framework error in iPhone static library

I have an iPhone app that uses the json-framework. I moved some of the code, including the json-framework source, from the main project to a static library. When I did this, the json-framework stopped getting compiled into the binary (double checked with class dump). This causes a nasty error: *** Terminating app due to uncaught excepti...

Can't draw OpenGL ES textures to non-round locations

When drawing OpenGL ES textures, they seem to "snap" to round pixel locations, as though the draw location was being rounded. ie. drawing at (x:1.1, y:5.4) actually draws at (x:1, y:5). This causes the textures to appear to "jump" when scrolling, rather than move smoothly. Yes, I'm using floating point types for my vertices, etc. D...

How to get the same UITableViewCell layout as in the Address Book app?

Hi, I currently have a custom UITableViewCell which contains a few labels, and an image. The "main" label is used to display people's names. Currently, I'm styling it in bold text. What I'd like to do (to gain some space and readability), is to mimic the Address Book app cell style, that is: first name in light text, and family name in ...

Detect embeded object in webview

Hello I was just wondering if using the private API it is possible to detect embeded videos and also get their src URL? This would be a huge help thank u so much. ...

NSFetchedResultsController Crashes When Navigating from One UITableViewController to Another

In my core data model I have a Person entity that has a "to many" relationship a Course entity (I also have an inverse "to one" relationship from Course to Person). Now I have a subclassed UITableViewController that uses a NSFetchedResultsController to display Person objects which works fine. I have this set up so that when you click o...

iPhone unread dots on homescreen on web app icon

I'd like to know if it is possible to have unread dots on a icon of a iwebkit-based webapp. I've read this but its for native apps. Is it possible to simulate this with javascript or something? http://stackoverflow.com/questions/610172/iphone-unread-counts-on-tabbar ...

Ideal Chunk Size for Writing Streamed Content to Disk on iPhone

I am writing an app that caches streaming content from the web on the iPhone. Right now, I'm saving data to disk as it arrives (in chunk sizes ranging from 1KB to about 60KB), but application response is somewhat sluggish (better than I was expecting, but still pretty bad). My question is: does anyone have a rule of thumb for how freque...

UIImageView EXC_BAD_ACCESS

---- MyEventSelectorCell.h @interface MyEventSelectorCell : UITableViewCell { IBOutlet UIImageView* eventImage; } @property(nonatomic, retain) IBOutlet UIImageView* anImage; ----- MyEventSelectorCell.m -(id) dealloc { [anImage release];// < -- If I comment this out, It starts leaking, but program runs fine... } ---- MyT...