iphone

how to set and access variable values from another classess

I am modifying QuartzDemo example app and want to do set and read values of integer type variables in other classes which are already included. For example, in MainViewController.m I want to set a numeric value (simple numbers from 1-100) to a variable which is then going to be called (read) in file QuartzImages.m. Question is how to d...

Template compiling errors on iPhone SDK 3.2

I'm porting over some templated code from Windows and I'm hitting some compiler differences on the iPhone 3.2 SDK. Original code inside a class template's member function is: return BinarySearch<uint32, CSimpleKey<T> >(key); where BinarySearch is a method inherited from another template. This produces the following error: csimpleke...

Allow swipe-to-delete in one instance of UITableViewDataSource, but not another

I've got a UITableViewDataSource that I'm using for two different UITableViews. In one of the table views, I want to enable swipe-to-delete, so I've implemented tableView:commitEditingStyle:forRowAtIndexPath, and it works as expected. However, in another table, I want to disable that feature. I've got it working by making two UITableV...

uiimage of uiimageview doesn't update before NSURLConnection sendSynchronousRequest (iphone)

Hi all, I'm replacing an uiimage of uiimageview before calling NSURLConnection sendSynchronousRequest, an as a result i don't see the new uiimage. How i can resolve this? tnx ...

How to embed cover art in an MP3 file so that the iPhone player displays it when downloaded

I want to be able to provide a URL to a music track, and when that track is played on an iPhone, to show the cover art. I've tried embedding the cover art as an ID3 v2.3 tag, and while desktop players like VLC and Windows Media Player can see it, it seems the iPhone doesn't. Is this possible? Does anyone know of a way to achieve this -...

How to Recognize a Hold Button {iPhone SDK}

Hi i have a Button i want hold this button to write something but i don't know how can i recognize hold button , can you help me ? thank you ...

Will the app get rejected if you write image to /private/var/mobile/Media/DCIM/100APPLE/ directly?

Instead of using UIImageWirteToSavedAlbum, is it safe to write your image to /private/var/mobile/Media/DCIM/100APPLE/ directly? ...

Problem with close socket

Hi, I have a problem with my socket program. I create the client program (my code is below) I have a problem when i close the socket with the disconnect method. Can i help me? Thanks and sorry for my English XP CFSocketRef s; -(void)CreaConnessione { CFSocketError errore; struct sockaddr_in...

iPhone: InterfaceBuilder nibs disconnected from my project

Since upgrading to XCode 3.2, InterfaceBuilder doesn't play nice. All of my image links are broken in IB but they'll show fine when I compile. When I go to the combo box to select an image for my UIImageView, it doesn't have the image files I've added to my app. I also can't create a new .nib and associate it with a class I've written. ...

Adjust UIScrollView scrolling threshold

Hi all, I have an UIView-derived class (MenuView) that handles touch events inside an UIScrollView. Small finger movements are properly captured by MenuView; sweeps are captured by the outer UIScrollView and translate into scrolling. The MenuView gets a [touchesCancelled] notification. Apparently a decision is made within UIScrollView ...

API to determine whether running on iPhone or iPad

Is there an API for checking at runtime whether you are running on an iPhone or an iPad? One way I can think of would be to use: [[UIDevice currentDevice] model]; And detect the existence of the string @"iPad" - which seems a bit fragile. In the 3.2 SDK, I see that UIDevice also has a property which is really what I'm looking for, b...

Programatically reinitiate an app?

I have a language toggle in my app and it would be really easy to manage if when the user switches language I could present an activityIndicator and reinitialize all the views of the app with the new language default. Sort of how the iPhone settings manage language changes. Is there an easy way to do this? ...

presentModalViewController does not want to work when called from a protocol method

I have a subview that when double tapped a protocol method on the subview's parent view controller is called like this... - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *theTouch = [touches anyObject]; if (theTouch.tapCount == 1) { } else if (theTouch.tapCount == 2) { if ([self.delegate respondsT...

How do I properly add the Kal framework to my iPhone project?

I'm new to iPhone development and I'm having trouble using the 3rd part Kal framework in my project. I can't find any documentation on how to add the Kal framework to my code, so I assumed it was just a matter of adding the source files to my project's "Groups and Files" and set the Header file search path to include the new code. I...

how to create numbers(images) in twitter format?

Hi, I am developing a list of buttons for a puzzle game where i want to place images on these buttons with good texture on it like what we see just like in twitter format.is it possible to do this? if so how? Thanks, ...

UITableViewCell not displaying text it has

Hi, I have a UITableView that displays 16 cells at a time. When I start scrolling, the 17th cell will be empty when presented to the user, even though it contains text as per the NSLog statements I have. So, there is text, but for some reason, every 17 cell will not display it. The first 17th cell is clearly marked and empty. Each subse...

Creating an Drop Pin MKPinAnnotation supporting dragging like the Drop Pin in Maps App.

Hi! I wonder if it's possible to create an MKPinAnnotation in a Custom MKMapView, which answers to touch and drag just like the "Drop Pin" annotation in the Maps App. I would like a way to drop a pin at a location given by the GPS. Then let the user fine tune the exact location by touching the Pin and dragging it right, if the GPS is a...

Adding an integer onto an array

I'm trying to add random numbers onto the end of this array when ever I call this function. I've narrowed it down to just this so far. when ever I check to see if anything is in the array it says 0. So now i'm quite stumped. I'm thinking that MutableArray releases the contents of it before I ever get to use them. problem is I don't know ...

Chaining Animations (iPhone / MonoTouch)

I'm trying to slide some (custom) tab-like buttons into view. I don't want them all to move at the same time. Also, they shouldn't move one at at time (where one slides after the other finishes). I want each button to begin sliding slightly after the previous. Preferably it would happen on a curve but just a fixed .1 second offset ...

Fake location for the device (custom)

I know there are a few apps out there to fake a devices location but specifically what i want to do is use a location grabbed from a url. What direction should I look for setting the location on the device. The scenario i have is a jailbroken Wi-Fi iPad tethered to a nexus one. The nexus one would host a background service that when ...