iphone

UITextView text disappear?

My program has a UITextView and I enter and scroll the text manually: [myTextView scrollRangeToVisible:NSMakeRange([myTextView.text length]-1, 1)]; The text will disappear after a certain amount of input (if text length > 200) However, when I output the content via NSLog, the text content is still valid and being updated every time I e...

Has PastryKit been successfully implemented by anyone other than Apple?

Has PastryKit been successfully implemented by anyone other than Apple? This article and others give a detailed breakdown and source code of PastryKit but has anyone actually got their own content into this framework? http://davidbcalhoun.com/2009/pastrykit-digging-into-an-apple-pie ...

Set graphics context to display UIImage (Obj-C)

Hi, I'm trying to render a UIImage in Objective-C (working on a simple iPhone app (breakout-type thing) to get used to the environment). However, I'm getting an "Error: CGContextDrawImage: invalid context" error when I try and draw it. My question is: how do I set the context that the DrawAtPoint method of UIImage uses? Here the rele...

Creating UIImage with per-pixel alpha from GL buffer

Hi, I'm trying to take my gl buffer and turn it into a UIImage while retaining the per-pixel alpha within that gl buffer. It doesn't seem to work, as the result I'm getting is the buffer w/o alpha. Can anyone help? I feel like I must be missing a few key steps somewhere. I would really love any advice on this. Basically I do: //Rea...

Updating/Removing UILables from View

hi, i'm creating some UILabels in my UIView, filling them with data, adding them to view and releasing them UILabel *speed = [self scrollLabel:@"some Text" x:455.0f y:75.0f]; [scrollView addSubview:speed]; [speed release]; the method: - (UILabel *)scrollLabel:(NSString *)text x:(float)x_ y:(float)y_ { UILabel *label = [[UILabel al...

Core Data Query slow

What's the secret to pulling up items that match characters typed into the search bar that react instantaneously? For instance, if I type in a letter "W" in the search bar, all phrases that contain a letter "W" in any character position within the phrase are returned immediately. So if a database of 20,000 phrases contains 500 phrases w...

detecting email account from within an iPhone application

Is there a way to know the email addresses to which the user has linked his iPhone to from within an iPhone application? ...

position of detail disclosure icon

How would I figure out the location of the detail disclosure button/chevron? I'd like to place some text above and below it aligned with the button. ...

MonoTouch Transitioning from a UINavigationController to a UITabController

Hi there, I am just beginning using MonoTouch and having a great time with it. I am however having an issue getting to grips with how the UIControllers and views interact with each other. For instance, i am beginning the app using a UINavigationController but under certain circumstances i want to transition to a UITabController. How is...

SQLite bulk insert on iPhone not working

Hi. I have been struggling with this seeminly easy problem for 48 hours, and I am no closer to a solution. So I was hoping that someone might be able to help me. I am building a app, that use a combination of a local (SQLite) database and an online database (PHP/MYSQL). The app is nearly finished. Checked for leaks and work like a char...

Weird layout problem with UINavigationController.

I've configured a NIB as follows: ...but when I display this NIB as a modal view controller, it appears on the simulator as: I recall seeing this problem a long time ago on a project, but I can no longer remember what I did to fix it. Any idea what I've done wrong here? Thanks very much. ...

Where do I start to implement a massively-multiplayer game on the Iphone ?

I have a card game on the iphone and I really would like to take it to the next step by allowing players to interact with each other in real-time environment. My questions: Do I need a web server ? Is there a third party specifically for iphone multiplayer games that I can use to host the game? I would probably need a database - what ...

refreshing singleton object data in object c

here is code + (SalesCollection*)sharedCollection { @synchronized(self) { if (sharedInstance == nil) { [[self alloc] init]; // assignment not done here } } return sharedInstance; } + (id)allocWithZone:(NSZone *)zone { @synchronized(self) { if (sharedInstance == nil) { sharedInstance = [super allocWithZone:z...

iPhone MkMapView lock center to userlocation

Hello. I have a MkMapView and want to keep the Map centered to the user's location, exaclty as the iPhone Map Application does when you press the scope button. I am using the setCenterCoordinate method because I don't need to set the zoom. I use it everytime the location is updated from the location manager. The problem is that as it u...

Can I speed up my use of Core Graphics to draw moving triangles every 1/10th of a second

I have recently added some Core Graphics elements to my app and it has slowed dramatically, rendering it just about useless. I am not sure if I am just not using Core Graphics efficiently (how do I make it faster?) or if this problem is inherent in the use of Core Graphics. My code is below, after this description: There are speech bubb...

Crypting CSSMERR_DLL_MISSING_VALUE when trying to sign code for iPhone device

I have some code which runs fine in simulator, but when I try to build for iPhone, I get a cryptic error: CodeSign /Users/.../myApp.app (1 error) error: CSSMERR_DL_MISSING_VALUE That's it. No other references. Sounds like it's something about my code signing privileges, but what exactly? My private key, certificate and provisioning p...

Unable to build project with CoreData classes

I am trying to migrate my sandpit code into my main project but for some reason I am getting the following strange error when trying to compile syntax error before 'NSManagedObjectModel' At first I thought this was because coredata wasnt in the prefix.pch file but I have added it in there too. This is the top of AppDelegate where ...

iPhone and GZip

Now I know that xCode automaticly does the GZip decrompession for you within: NSData *data = [NSData dataWithContentsOfURL:URL]; And it does work if I point to a Gzip file on my server. But since my content is dynamic, I have a PHP script that rather then create a gzip file like so: $zp = gzopen($file, "r"); $data = gzread($zp, $fi...

Why shouldn't a UITableViewController manage part of a window in Cocoa Touch?

I have a view that contains a UITableView and a UILabel which works perfectly as far as I can tell. I really don't want to manage the UIView and UITableView with the same controller as the UITableViewController handles a lot of housekeeping and according to the documentation: If the view to be managed is a composite view in which a...

iPhone SDK Quitting

I have found many apps where you can press a button or something similar and the application will terminate and bring you back to the home screen. How would I do this? ...