iphone

UITableView reloadData problem

I've got following problem: I create a new file. Then call my function to reload my fileList with all Files in my Documents directory. After that I fire the dataReload of my TableView. The Problem I have is that my TableView don't shows all files. The existing Files are shown but the new one not, but therefore the last filename is shown ...

iPhone imageView layer masksToBound leads to slow scrolling

I have a UITableView with about 30 cells, 5 are viewable at a time. In each cell I have 2 UILabels and 1 UIImageView. I use a CALayer to render the image view with a rounded border. myImageView.layer.masksToBounds = YES; myImageView.layer.cornerRadius = 2.5; myImageView.layer.borderWidth = 1.0; myImageView.layer.border...

Cocos2d:How to Zoom-in Zoom-out effect on a Sprite image?

Hello everyone, I am developing module where-in i pick the image from photo library and put into a Sprite. I want to implement Zoom-in, Zoom-out kind of effect for a Sprite image, same like camera album images zoom in/out effect. Could someone please guide me how do i implement it? I see somewhere is that, i have to detect two touch eve...

Manage build target variables in iphone project

We're transitioning to an automated build process for our iphone projects. These projects can be checked out by individual devs, in which case all the API URLs need to point to a certain path. There are also a variety of build environments, each with their own API root paths. I could probably add multiple, different build targets, and...

I want close a CFSocket

Hi, I have create a socket with CFSocket. My program is correct but now i wanna close the socket (client side). There is a istruction? Thanks and sorry for my English XP My code: CFSocketRef s; s = CFSocketCreate( NULL, PF_INET, SOCK_STREAM, IPPROTO_TCP, kCFSocketDataCallBack, AcceptD...

TFHppleElement (Hpple), parsing HTML on iphone

I'm using Hpple and it's been great so far however I want to get all the divs inside another and that I can do. But then I am unable to further parse the contents (innerHTML, and in the source it is labelled innerHTML not innerText) asking for the elements content returns nothing as there is no text directly in that element, only child n...

Set background of UITableview in interface builder?

In iPhone I need to set the background view of a UITableview. From 3.2 SDK I can in code use something like: [self.tableView setBackgroundView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mycustombackground.png"]]]; But how can I do the same in interface builder? It would be great if I could just set the background view di...

UIAlertView within XML Parser didEndElement not showing

Hi guys, I am working on an iphone application. Application uses .net web service to perform an operation and return the status either "Success" or "Failure". I am getting this status in xml parser didEndElement like if( [elementName isEqualToString:@"OperationStatusResult"]) { } I am trying to show an UIAlert view if status is fai...

implementing stretchable dialog borders in iphone sdk

Hi, I want to implement dialog borders that scale to the size I require the dialog to be. Perhaps there is a better more conventional name for this sort of thing. If there is, if someone would edit the title, that'd be great. Anyhow, I'd like to do this so I can have dialogs of any size without the visual artifacts that come with scal...

How Do I Test for Existence of an External Constant NSString?

In iPhone SDK 3.2, the MediaPlayer framework was expanded. One of the constants newly defined in the framework is MPMediaPlaybackIsPreparedToPlayDidChangeNotification. I'm building a universal app. How can I test at run time for the existence of this constant? If the constant exists, then my app can use this newer notification. If not,...

NSUserDefaults doesn't save

Hi everybody! i'm trying to save some informations in an iphone/ipad app. The problem is that it works but if i close the app (with the home button on the simulator or closing with cmd+q) the informations become lost! this is my code (and, if you see, i used "syncronize") - (IBAction)choose1{ NSUserDefaults *defaults = [NSUserDefa...

Dynamically create sprite images for Cocos2d-iPhone

Hey guys, I'm working on a platformer, and looking for a way to create a sprite for an arbitrarily sized platform. For example, I may know I have a platform that should appear 200 pixels wide by 32 pixels high, and, say, I have a texture of bricks that I can tile to fill that area. I may also want to draw a black border around the platf...

How do I prevent my table cell's textview from being editable after editing is done?

So this is an interesting problem. I have custom tableviewcells that include a text field. When In my cellForRowAtIndexPath I have an if statement that determines whether or not the cell's text field should be editable- it looks like this: (self.isEditing) ? [infoCell.textField setEnabled:YES] : [infoCell.textField setEnabled:NO]; Thi...

iPhone Circular Progress Indicator

I'm trying to create a circular progress indicator like Shazam. It will represent progress during recording. There will be a finite amount of time and I want it to react to the sound level like Shazam's does. Any clues where to begin? Thanks ...

Core Foundation equivalents for NSURLRequest and NSURLConnection

I'm aware that NSUrl is bridged to CFUrl. What are the Core Foundation equivalents for NSURLRequest and NSURLConnection so I can do something with a CFUrl object using pure C? ...

iPhone OS: Why is my managedModelObject not complying with Key Value Coding?

Ok so I'm trying to build this stat tracker for my app and I have built a data model object called statTracker that keeps track of all the stuff I want it to. I can set and retrieve values using the selectors, but if I try and use KVC (ie setValue: forKey: ) everything goes bad and says my StatTracker class is not KVC compliant: valueF...

How do I handle memory warnings when generating UIImages from PDF files in Objective-C?

When converting PDF Pages into UIImages I receive memory warnings all the time. It seems there is either some leak or something else that eats my memory. Using instruments didn't give me any helpful details. I'm using the following function to generate images from a pdf file: - (UIImage*)pdfImage:(NSString*)pdfFilename page:(int)page...

Has anyone got jquery-csv2table to work with iPhone Safari?

I'm trying to figure out why Safari on the iPhone will not load pages created with jquery-csv2table. They load correctly in Safari on the Mac. Any suggestions would be appreciated. Thanks. ...

Best way to programmatically detect iPad/iPhone hardware

The reason I need to find out is that on an iPad, a UIPickerView has the same height in landscape orientation as it does in portrait. On an iPhone it is different. The iPad programming guide introduces an "idiom" value to UIDevice: UIDevice* thisDevice = [UIDevice currentDevice]; if(thisDevice.userInterfaceIdiom == UIUserInterfa...

How much should the AppDelegate do?

I'm designing quite a large App and on startup it will create sessions with a few different servers. As they are creating a session which is used across all parts of the app its something I thought would be best in App Delegate. But the problem is I need the session progress to be represented on the screen. I plan to have a UIToolBar at...