iphone

How to use a UITableView to return a value

How would I use a tableView as a value selector? So I have a series of input fields and what I want is when you select a cetian field it opens a tableview of options that you can pick from as a value for that field. Upon selecting an option it returns to the previous View with the selected value filling that field. ...

How to load data from a plist for OpenGL Rendering (iPhone)?

I have an interesting problem. I have 4 arrays stored in a .plist file, they are called "vertices", "normals", "texCoords" and "polygons" (this file is attached, along with GLViewController.m). l want to load these arrays into arrays of type Vertex3D, Vector3D, GLfloat and GLubyte respectively, and then render them using OpenGL. However,...

Singleton Class iPhone

Ok, I'm trying to avoid global variables, so I read up on singleton classes. This is a try to set and read a mutable array, but the result is null. //Content.h @interface Content : NSObject { NSMutableArray *contentArray; } + (Content *) sharedInstance; - (NSMutableArray *) getArray; - (void) addArray:(NSMutableArray *)mutableArr...

iphone uiview circle?

Newbie Q. I wish to subclass a UIView so that it renders a circle. How is that done in an iPhone? ...

iPhone built-in controller to display a collection of images in cool 3D lanscape view

For some reason, I can't seem to locate the documentation for the above support within the foundation. I am talking about the view used by some applications to show a collection of images in a cool 3D view where you can flip through the set, much like the iPod application view of the albums. Thanks! ...

Is it possible to access iPhone/iPod Touch music stats through the SDK?

I've seen it's possible to access musics and playlists and even play them. But is it possible to access the statistics attached to each music? Like play count, stars, dates and times of listening? ...

Finding a sublayers position on the screen after several CATransforms?

My iPhone app has a mainView. added as a sublayer to this MainView is CircleView. CircleView rotates as the phone turns and tilts as the phone tilts, using 3 concatenated CATransform3D transforms. DotView is added as a sublayer to CircleView. After all these transoforms, I have no easy (or apparent) way of knowing the coordinates of dotV...

iphone drow shadow on circle

I have a simple circle drawn in my sub classed uiview as below. How do I add a slight drowshadow on the bottom of the circe? - (void)drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); UIGraphicsPushContext(ctx); CGContextSetRGBFillColor(ctx, 1.0f, 1.0f, 1.0f, 1.0f); // white color CGContex...

EXC_BAD_ACCESS after modifying string

I am manipulating a large string by removing chunks of characters, and assigning the new string back to the original string. articleString = [articleString stringByReplacingCharactersInRange:startRange withString:@""]; articleString is an instance variable of type NSMutableString This seems to work fine the first time I go through t...

can an iPhone application create more than one button on the applications screen?

I'd rather write an application with two buttons on the applications menu than use just one - and have two paths through the app. Can this be done? Is there some way of creating buttons on the applications screen? Thanks. ...

Strange problem with custom cells and the uinavigationcontroller

Hey there, I've got a navigation controller that has a grouped table with several rows, each using the same custom cell class. If I select a row it navigates to the next view. When I go back, just for a brief second, the background of the custom cell that was originally selected, expands to the full width of the screen then back again...

iPhone SDK: How to access a ViewController nested in a TabBar from MyAppDelegate?

I'm trying to call a method in my FirstViewController that is the File Owner of the first View in a TabBar. I've tried using this line of code but just get the error "No '-showData' method found": [[tabBarController.viewControllers objectAtIndex:0] showData] But the log says that [tabBarController.viewControllers objectAtIndex:0]...

What are the protocols supported in Iphone's External Accessory Framework

Hi guys I'm working on an iphone/ipod app that will need to communicate with a computer (MAC for now, maybe PC if possible) though the USB dock connector cable. I'm a complete beginner with IPhone programming and from what I've been able to find out, the External Accessory framework is the place to start. While going through the online...

iPhone Adding Sub View dynamically

Newbie Q. In my MainViewController, which is the first visible view. I have a Circle class (no XIB) which subclasses UIView and overrides the draw method to draw a circle. Hello-World simple. In the MainViewController how do I add the custom class I wrote so that it appears programatically? Do I need to do anything besides overriding...

Wildcards in strings

I'm interested in using rangeOfString with some wildcard characters as part of a search string. For example, if I have several strings like "244px" and "356px" and I want to convert all such strings to "320px". Is there a way I can use wildcards to get the desired result? ...

how to retrieve magnetic value from CLHeading

Hi experts, i'm trying with CLHeading to get compass value, (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { if (curHeading != nil) [curHeading release]; curHeading = newHeading; NSLog(@"%@",curHeading); [curHeading retain]; } the above give result as - magneticHeading 89.00 trueHeading ...

UIImagePickerController in Landscape

Hi Everyone: I have been searching for an answer to this, but cannot come up with anything. Apparently, iPhone SDK 3.0 made it possible that UIImagePickerController can be displayed in landscape mode - but I am not finding any method that will allow this. I would think that if the application is in landscape by default it would automa...

Running NSTimer Within an NSThread?

I am trying to run a timer in the background of my application, i am using the timer heavily in my application and i'd rather running it in the background, However i am getting memory leaks when trying to release the NSAoutreleasePool. My Timer class is singleton, so if i start new timer the old timer get dealloc it . + (void)timerThrea...

Is it possible to edit numberOfLines of UITableViewCell?

Is it possible to edit numberOfLines of UITableViewCell when click on that cell? possible? example cell.textLabel.numberOfLines = 1; when selected at cell cell.textLabel.numberOfLines = 5; thanks for all reply ...

Upload text file on FTP server using iPhone

I have implemented code for uploading images and directory to FTP using iPhone. But I need to upload text file on FTP using iPhone. Can you please send me code for that. ...