objective-c

Where can I get a complete reference on Mac OS X's CoreWLAN?

Googling for CoreWLAN brings a mere 701 results -- Apple's own shallow reference isn't even there, at least not on the first pages. For instance, I would like to know what are the possible values of kCWScanKeyScanType when scanning for networks. Apple will only say it defaults to APScanTypeActive, but doesn't explain what that means or ...

How do I find the frame of a UIView in the context of a UIScrollView?

Hi, I'm trying to place a UIPopoverController to display when a UIButton is tapped. However, the UIButton is placed within a UIScrollView and so its frame is offset by the scroll amount. Is there an easy way of finding out a view's frame as it appears in the context of the screen? Or do I just need to do a subtraction between the UIBut...

problem during Twitter+oauth integratin ?

hello i am using twitter + oauth for twitter integration in iphone. when i run the app. i got message such as "sorry that page doesn't exist!" even though i am using following things. self.requestTokenURL = [NSURL URLWithString: @"http://twitter.com/oauth/request_token"]; self.accessTokenURL = [NSURL URLWithString: @"http://twi...

Insert horizontal line in NSOutlineView

After every group item (collapsible item) in an NSOutlineView, I need a horizontal line, as a separator. How do I do this? ...

Changing a UIImageView image with a slider

I have a view with one UIImageView and a slider. Slider Min 1 Max 10. When slider is moved UIImageView should display a different image. Slider is 1 test1.png will display, slider is 2 test2.png will display, slider is 3 test3.png will display etc... In Interface Builder I have connected IBOutlet slider to Horizontal slider, IBOutlet i...

UIWebview works slow

Hello All, UIWebview load the content very slow. WebView=[[UIWebView alloc]initWithFrame:self.view.bounds]; WebView.delegate=self; [WebView addSubview:spinner]; [self.view addSubview:WebView]; NSString *decodeString=[@"www.google.com" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; [WebView loadRequest:[NSURLRequest r...

c++ class with objective-c friend

I have an application thats a mix of c++ and objective-c. Quite a lot of the c++ classes exist merely as facades to access the underlying objective-c object from the rest of the x++ application. My problem is one of design: The objective-c class needs to call back into the c++ class via a set of methods I'd prefer to mark as private - ...

How can I add an image in all the cells in UITableView?

I am using this in - (UITableViewCell *)tableView:(UITableView *)atable cellForRowAtIndexPath:(NSIndexPath *)indexPath { UIImage *image = [[UIImage alloc] imageNamed:@"arrow.jpg"]; cell.imageView.image = image; return cell; } cell.imageView.image is throwing error.. ...

Comparison of 2 identical strings

I am going crazy - these 2 strings are identical but the code comes back as them being different!: NSLog(@"nearbyAirport %@", nearbyAirport.geocode); NSLog(@"airportToFind %@", airportToFind.geocode); //Try and match geocodes. If they are the same then airport is valid if ([[airportToFind geocode] isEqualToString:[nearbyAirport geocod...

Set MKMapView region to center on two annotations

I'm looking for some help with finishing some code on setting the region on a MKMapView based on the current location annotation and an annotation I have set. I want to calculate the distance between the two and set the center between the two and then zoom out so both are in view. It appears to work fine in Simulator for me, but unfortu...

Class initialization breaking application

I've recently created a new class for my iPhone application which will hold information read from a text file containing the street address and GPS points of points of interest. The issue though is that whenever I add code to initialize the class my application loads up and the instantly quits with no errors in the console. When I remov...

Problem with conflicts bettwen UIGestureRecognizer and in iPhone

Hi. I'm working in small app for iPhone which uses openGL. The app is supossed to : Move around the screen with a moving touch. Zoom in/Out by tapping I'm overwritting this functions to handle the coordinates of the touchs and move around the screen with my finger, with success, working perfectly: (void)touchesBegan:(NSSet *)touch...

NSMutable Array and brain damage

I have understandably attracted some smart ass answers to some bone head questions I have asked lately due to my complete misunderstanding of obj c and NSMutable arrays. So I've looked in a book I have and Google and it would appear that may be I shouldn't program because I'm still stuck. Say I'm looping through method A and each loop ...

Problem with NSStrings and UIAlertView

I have having a very odd issue when utilizing this UIAlertView. When viewing a Physician they have several offices. Upon selecting one you get an alert that offers to call this location or display it on a map. To create the alert and to have data at the ready when the alert is dismissed, I declared 4 NSStrings (although I probably only n...

NSMutableArray Not Being Set

I'm trying to do some simple assignment, but coming up with different results and I can't figure out why. Why does the first assignment below work and the second one not? NSMutableArray *mutableFetchResults = something approrpriate here; [self setLocationsArray:mutableFetchResults]; [switchViewController setLocationsArray:mutableFetch...

tableview [cell.contentview viewwithtag:] is returning nil

I have a tableview with four sections first section has 7 rows in that first six rows has a textfield and the last row has two textfields Section 1 t1 t1 t1 t1 t1 t1 t1 t2 section 2 t1 t2 t1 t2 // second row textfields are placed in fourth rows t1 t2 t1 t2 // fourth row textfields are placed in someother rows t1...

right bar button not loading in navigation bar

I have the following code inside my @interface FriendsNavController : UINavigationController class implementation. The code is executed. I just don't know why it's not showing the button... - (void)viewDidLoad { UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Add Event" style:UIBarButtonItemStylePlain target:self ...

UIViewController only viewWillAppear fires

I have a UIViewController as the root view controller of a UINavigationController. And when it appears for the first time, or it becomes visible as a result of the user pressing back viewWillAppear fires but viewDidAppear does not. Also when the next view is pushed to be visible and the root dissapears, neither of the disappear methods ...

Store cache images

I'm looking for the best read performance for a bunch (~200) cached 80px by 80px images. A large chuck (~50) will all needed to be accessed at once. Should I store the uiimages (as binary data) in a plist or using core data? ...

NSNotificationCenter: How long does it take to perform an operation

I want to know how long does it take from posting a notification to getting the notification. The reason is that I want to find out if the observer pattern is suitable for me. I don't want that another view controller can change the value before the notification has been sent and processed. I'm afraid that another process (thread?) is f...