iphone

IPhone Instant message Client desgin problem

I am writing an IM Client on iphone.// post ref: #IMClient01. Here is my initial design of it: (UIView*)LogInWindow; // to log in (UITabBarController*) MainTabBarController;//have three tabs, namely:Contacts, Chats, My Profile (UITableViewController*)ContactsController; //manages a list of contact/user (UITableViewController*)ChatsCont...

iPhone OpenGL ES alpha blends as white in simulator, gray on iPhone

My problem is incorrect alpha blending using OpenGL ES 1.1 on iPhone. Unlike many other peoples' issues with this, textures are not involved. I am drawing dozens of small white circles on a light blue background. Each circle is a drawn as a GL_POINT. I am animating a fade from alpha=1.0 to alpha=0.0. Everything works perfectly in the iP...

interface builder setters? please punch me!

if you have an IBOutlet on an ivar like IBOutlet UIView *view; @property (nonatomic, retain) UIView *view; that object created by ib will be managed by ib, but what if you have, UIView *view; @property (nonatomic, retain) IBOutlet UIView *view; does ib now use your setter to set that object? that would mean the setter has added +...

iPhone application cache and XMLHttpRequest

I have a WebApp that I've been try to make work offline. The WebApp is too big, even minified, to simply use the application cache (things download but I eventually get a window.applicationCache error). I'm trying to use XMLHttpRequest to get the larger scripts and main html and keep them in localStorage and just keep a small loader scri...

URLWithString returns nil for resource path - iphone

Having a problem getting the URL for a resource for some reason: This code is in viewDidLoad, and it's worked in other applications, but not here for some reason: NSString* audioString = [[NSBundle mainBundle] pathForResource:@"sound" ofType:@"wav"]; NSLog(@"AUDIO STRING: %@" , audioString); NSURL* audioURL = [NSURL URLWithString:audi...

UIViewController does not get displayed from UITableViewController

Hello, I've got UITableViewController and the body of the tableView:didSelectRowAtIndexPath: method is following: if (indexPath.row == 0) { MyViewController *myViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil]; [self.navigationController pushViewController:myViewController animated:NO]; ...

iPhone -- customizing a grouped table view in Interface Builder

I am writing an iPhone app. According to the design, it is supposed to contain a lot of grouped table views. In these views, the rows are frequently not similar to each other. For example, on one screen, one row is the name of a task, another is its owner, another is its description, yet another is its history (which is supposed to be...

Changing self.view depending on size of array

I have a an app that has a UITabBarController. What I would like to achieve, is that the first ViewController included in the TabBar displays a TableView if there are items in the array property (loaded from CoreData), or a UIImageView (with more information about how to add items) if not. If the user goes to a different TabBarItem, and...

back button goes back to a different UITableViewController from where it came from

Say I have UITableViewController A, and UITableViewController B. Both A and B loads UIView C. At the back button in C, how do I make sure it always goes back to B, rather than where it came from? Here is a concrete example: A=Contacts window in iphone skype. B=Chats window, each row is a chat history with a different person C = Chat win...

NSNotification not being sent when postNotificationName: called

I'm trying to get one instance of using NSNotificationCenter with addObserver and postNotificationName but I can't work out why it won't work. I have 2 lines to code to add the observer and send the message in 2 different classes [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(newEventLoaded:) name:@"Event" obj...

limitations of GL_DOT3_RGB

I'm using texture-based DOT3 lighting to achieve bump mapping on older iPhones, and I'm wondering if there's a sneaky way to make it look correct even when the viewpoint changes. With "real" lighting, normals get transformed by the inverse model-view matrix. With texture-based DOT3 lighting, there's no transform. With shader-based bump...

device rotation: portrait- landscape

Hi, I am working on iphone application in which i am showing camera view for zoom in zoom out using scroller. I want to add functionality, when a user rotate device from portarit to landscape or vice versa then camera view should adjust accordingly. how can i fix it Please help thanks, Aaryan ...

iPhone Accelerometer calibration

How do I properly calibrate the accelerometer for my iPhone game? Currently, when the phone is on a flat surface, the paddle drifts to the left. High or Low Pass filters are not an acceptable solution as I need complete control over the paddle even at low & high values. I know Apple has the BubbleLevel sample but I find it difficult to f...

[iPhone] Objective-C : How to fetch the router address?

Hey there! I tried to fetch the router address this way. - (NSString *) routerIp { NSString *address = @"error"; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int success = 0; // retrieve the current interfaces - returns 0 on success success = getifaddrs(&interfaces); if (success == 0) { // ...

How Push Notification Service Works for iPod Touch?

I am developing an app using push notification service for both iPhone and iPod Touch. For iPhone the user can register their device using UDID or phone number. How can an iPod touch people receive the notifications as there is no phone number for the device? I must miss something from my understanding. Please help! Thanks. Marcelo ...

iPhone Rotation ... won't rotate .. plz help

My view hierarchy looks like this: tab bar -> navigation bar -> table view -> view 1 -> view 2 (UIWebView) How can I rotate view 2 so it can be displayed in both landscape & portrait mode? ...

[iPhone] Objective-C : Relationship to own class (CoreData)

Hey folks! In my project there is a managed object called "Group". This object itself can contain child group objects. How do I solve this situation in CoreData and in the FetchedResultsController? My first shot: http://i46.tinypic.com/zvonpd.png Thanks, Dan ...

How can I get scrollViewDidScrollToTop to work in a uiTableView?

I think the title explains it all. I want to be notified when a user scrolls to the top of a tableview. I've tried the following with no luck and even added a UIScrollViewDelegate to the .h file. - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView{ NSLog(@"ScrolledToTop"); } Thanks! Edit: I can get it to call if I press ...

toolbarItems not being pushed with view

I have a NavigationController based iPhone app that has a navigationBar and a toolbar. Here is basically how it works: The applicationDelegate pushes a "SplashScreen" onto the RootViewController as a modal view. While the splash screen is up, the application does some work and based on the user's location will either just dismiss the mo...

uiimage allocation problem

I have 3 UIImages in UIScrollView and I am initializing these images in the following way: UIImage *dimage = [[UIImage alloc] initWithData:data]; Where data is a NSdata gotten from url request. After this I am caching the images. When I check memory allocation the 3 images takes up 472 Kb each and allocation has been requested by "img...