iphone

how to display section view from pasring xml result for iphone

ok here is the code - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { #pragma mark parse DetailXml //XMLAppDelegate *appDelegate=(XMLAppDelegate*)[UIApplication sharedApplication].delegate; Book *aBook = [appDelegate.books objectAtIndex:indexPath.row]; i need this to...

How to make a chat system on iPhone?

I'm doing research for making a chat based app for the iPhone (it's not really text chat in the regular sense, but the principles are the same). Maximum 6 people can be logged into the same chat room at any one time, and the most basic question is how to efficiently check for new messages? Would I need to simply poll the server perio...

Why I need to retain the managed object in order to process?

Here is what was going on in my code. I have a class B which contains a method retuning the fetched result R whose type is NSManagedObject to my current class A. And I assign the R to the the property pR in A. After a while another method in A tried to update the object MO and persistent it in database. However pA became nil at that time...

Problem removing and re-adding an image file into my iOS4 app bundle

My problem is something that should be so simple it is mind boggling. When I change the look (in PhotoShop) of an image file that is being stored in my app bundle. My method for replacing the old image in the bundle with the new one is this: 1) remove the old image from the app bundle (choosing to also move to trash) 2) drag the new i...

(iPhone)Instruments question

Hi, Just wondering if my iPhone application should be running slow when I put it through instruments? When I test my app using instruments, it goes extremely slow and is frustrating to use. Thanks. ...

iPhone - retrieve images in background (PUSH)

I would like to build an app which retrieves images from my server. My problem is that I want it to work in the background and only when there is a 'new image' to load. It seems like what I need is very similar to PUSH notifications: Work in the background Only when there is 'something new' to load. I guess what I want became possi...

Looking for a few tutorials on switching views and cross-view communication

Hi, I'm looking for a few good tutorials or articles out there that might help me with communicating between different views which I have setup in a TabBarController. I'd like to know how to properly call upon methods in other views of my TabBarController and then switch to that view. The other thing I am curious about is how to launc...

Why we need to add property and synthesize?

Hello, I've read many books about Iphone dev. I'm new to objective c. Why we need to add property and synthesize? Can someone explain and relate it to real life story. eg: pointer - we call cop to catch criminal Thank you ...

How to prevent a UIView from going out?

Hi guys, I currently am translating/transforming my UIView. I need to prevent a UIView from going out, e.g. prevent users from seeing the background behind when they drag the UIView. Something like the bounces when you go out of bounds in UIScrollView implements would be nice. Unfortunately I can't use a UIScrollView because I need to d...

cocos2d: How to set a timer

Hi, I am developing an iPhone app using cocos2d and box2d.In this app i require to set a timer. The timer will show the remaining time in hand of an player to reach destination... how can i do that.....i have drawn a scene but no sure as i am beginner how to add timer.. thanks ...

How is the zoom level set for map view?

How does one set the zoom level on a mapview? I have a map and when showing some locations, the name isnt displayed as the map isnt zoomed in enough. ...

How to write Portable C/C++/Objective-C++ code to target Apple iPhone/Mac OSX?

I'm working with some C/C++ code that runs on Win32 and also VxWorks. It uses #ifdef WIN32 to switch to platform specific implementations. I've been using the code on the iPhone and I want to update it and keep it as portable as possible, but I'm not sure what's the best practice. So far I've been using #ifdef __APPLE__ blocks. What ...

UIImageView not reflecting changed images

In my project, I made an animation for my UIImageView using some pngs. I recently swapped those pngs out for different images (with different file names) and removed the previous pngs to the trash. I updated my code to reflect the file name change but when I build my application, I still see the animated images that are not referenced in...

authenticating user with facebook on iOS without UIWebView

Is there a way to authenticate a user with facebook in the background using id/pass he entered in configuration screen? I mean authentication without the usage of UIWebView, but using some kind of Http client to retrieve auth token (OAuth 2.0 preferably) ...

Changing Image Using Button iPhone

Hi, I have a UIImageView *picture and a UIButton *next and an - (IBAction)next { } I want to change the image on the view but only if the image equals... for example img1 But using the same button I want to also be able to change the picture if the image = img2 but to a different image (img3) So far I have this code but it gives me...

Question about view controllers in the iPhone SDK

Hello. I will begin by saying that I'm 15 years old and from Sweden, so please excuse my English. I'm reading a book called Beginning iPhone 3 Developement - Exploring the iPhone SDK, by Dave Mark and Jeff LaMarche. I've read about navigation controllers and multiview applications, and now I want to create my own little app, a very simp...

How do I declare index=0 in .h file iPhone

// Declare index in Header.h index=0; - (IBAction)next { index++; // Set imageCount to as many images as are available int imageCount=2; if (index<=imageCount) { NSString* imageName=[NSString stringWithFormat:@"img%i", index]; [picture setImage: [UIImage imageNamed: imageName]]; } } Where do I decl...

Cocoa touch connection and data design pattern

Hello all. My question is a design issue and it has been driving crazy over the last couple of days. I am new to cocoa touch development. I have an application that has a UINavigarion controller and a 3 views. I need to keep communicate with a WCF service and store the data on the app side. How do I create my Model (MVC) in a way tha...

iPhone SDK UISearchBar help

Hi everyone , i try to create an UISearchBar for my app base on Beginning iPhone 3 Development book (chapter 8) , and i have 2 problem : 1- My Plist file is simple i mean without any <KEY> , and when i add the plist file into project and change the sortednames name to my plist file i have nothing in table !!! i remove the table sections...

Trying to change image using int

Hi, I have this code: - (IBAction)next { static int index = 0; // <-- here index++; // Set imageCount to as many images as are available int imageCount=16; if (index<=imageCount) { NSString* imageName=[NSString stringWithFormat:@"img%i", index]; [picture setImage: [UIImage imageNamed: imageName]]...