objective-c

Using GKPeerPickerController within a selector from a Cocos2D CCMenuItem

Hey everyone, So i'm trying to use GameKit along with Cocos2D so that when a user clicks on the multiplayer menu item it will display the GKPeerPickerController. I'm however, running into some snags. It doesn't seem to want to compile. However, it doesn't give me an error inside of the code that's in my selector. Anyways here's the code...

Can I autorelease an instance of NSProxy?

Does NSProxy really implement -autorelease and -release? If not, do I need to manually dealloc NSProxy instances? (Please assume that I am not using GC). Thanks for clear this up for me. ...

How to Create Custom UITableViewCell Editing Transition?

I have a custom UITableViewCell which has an image & and some text. When entering editing mode, I would like the image to fade out & move offscreen to the left. When & how do I implement this code? I tried putting an animation block in willTransitionToState: but the image simply jumps offscreen w/ no animation. ...

Is dealloc method called in presentModalViewController when dismiss the controller.

Hi Guys, here the following code is used to view the present modal view controller. [[self navigationController] presentModalViewController:doctorListViewNavigationController animated:YES]; the close action is in the next view controller(DoctorListViewController). You can understand by seeing the following code I added now cleary. -...

getting memory allocation at ActivityIndicator in Iphone sdk

Hi Guys, Here I'm gettimg memory allocation problem at activity indicator and my code is: - (id)init { if (self = [super init]) { self.title=@"Release Details"; contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; contentView.backgroundColor = [UIColor clearColor]; self.view = contentV...

How to set title in the MFMailComposerViewController ?

Hi All, I am trying to set the title of MFMailComposerViewController , which is a subclass of UINavigationController. I am using these following ways : MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; [picker.navigationController navigationItem].title = @"Send Mail"; [[picker navigationItem] setTitl...

Is memory leak caused by global variables?

When I checked my application for memory leaks it is showing 12 leaks. What will be the effect of this? I used global variables as shown below #import "file1.m" int num; #import "file2.m" extern int num; num = 10; Can this cause memory leaks? Anyone please help. I am a beginner in programming. ...

UIScrollView and CATiledLayer question

I am using a CATiledLayer as content of UIScrollView, but seems I can not get the correct (sometimes) [scrollView contentSize] and [scrollView contentOffset] from CATiledLayer's delegate method : (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx I know CATiledLayer uses this method to render tile in a background thread. A...

show a new view after x seconds?

hey all, i'm quite new to objective c and i have this problem. i'm animating an image an show this in a imageview. after 15 seconds i want to show another view, thought of a "flying in view from the bottom". any hints fpr me how i could manage that? thanx in advance marcus ...

Change position of navigationItem.title

Hi, In my ViewDidLoad I try something like that but its not working: UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10,2,60,14)]; label.autoresizingMask = UIViewAutoresisingFlecibleWidth; [self.navigationController.navigationBar addSubview:label]; I want to display a label in the left part of my NavigationBar. Or maybe...

Getting "Location" header from NSHTTPURLResponse

Can't get "Location" header from response at all. Wireshark says that i've got one: Location: http://*/index.html#0;sid=865a84f0212a3a35d8e9d5f68398e535 But NSHTTPURLResponse *hr = (NSHTTPURLResponse*)response; NSDictionary *dict = [hr allHeaderFields]; NSLog(@"HEADERS : %@",[dict description]); Produces this: HEAD...

how to make disable the default leftbarbutton in navigation bar in Iphone sdk?

Hi Guys, I want to disable the left bar button when my webview is loading can any one tell how to disable the leftbarbutton? Anyone'shelp will be much appreciated. Thank you, Monish. ...

How no make a button show UINavigationBar only in 3 of 5 tabs in UITabBar?

I have an app, where there's a UITabBar with 5 tabs. When user shakes the device, I want the UINavigationBar to push an UIImageView. When I show the UIImageView, I need to hide both tab and nav bars. After that, when user taps the UIImageView, the NavBar appears again and user can go to the UIImageView's parent view. I make the Nav Bar a...

getting Javascript Array in Objective C

I have created an Array dynamically in JAvascript. I want to retrive the Javascript array in Objective C (in .m file) . Can anbody tell me How to do this ? ...

The dealloc method is not called in the present modal view contrller.

It is in My view controller -(void)doctorsListAction { if(isFirst == YES) { [self getDoctorsListController]; [[self navigationController] presentModalViewController:doctorListViewNavigationController animated:YES]; [doctorListViewController release]; } } -(void)getDoctorsListController { //Docto...

Unable to find CFNetwork in Xcode

Hello, I am trying to use CFNetwork in my app so I tried adding CFNetwork.framework from the Edit Target dialog in Xcode. The interesting thing is that CFNetwork is not visible in the dialog box at all. Am I missing anything? Do I have to add/install CFNetwork in some other way? Screenshot - Thanks in advance. ...

Memory leak at Autorelease pool in Iphone sdk

Hi guys, I am getting leak at [pool release]; My code here is: #pragma mark UISearchBarDelegate delegate methods - (void)performSearch:(UISearchBar *)aSearchBar { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; artistName= [aSearchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSe...

iPhone - How do I find the MAC address of the connected WiFi access point?

Without using the private APIs, is it possible to programatically determine the MAC address of the access point that the iPhone is connected to? I understand that this should be doable using the core BSD libraries, but we are new to this, so it would be great if someone can point us to some starter code. Note: we're trying to determine...

Make UIImageView change its contents when user rotates the iPhone

So I have an app with a tab bar, each bar contains a UINavigationController. When user shakes the device, a UIImageView appears as a subview of the nav controller. But the app has a landscape view as well. If the UIImageView is active in portrait mode and user rotates the device, this code works: - (void)willAnimateRotationToInterfaceOr...

Getting objc_msg send exception while release navigation controller and view controller in presentmodelviewcontroller

Hi Guys, I'm getting exception in dealloc when I release navcontroller and viewcontroller of presentmodelviewcontrolelr the code that i wrote MasterViewController* viewController = [[MasterViewController alloc] init]; viewController.pathIsFrom = @"Home"; isBookMark=YES; viewController.isBookmark=isBookMark; UINavigationControlle...