Tag: xcode

Error compiling for unit test using google toolbox for mac

Hi my application runs fine but when I try to run the unit tests I am getting this error… 2010-10-19 00:27:49.919 AssignmentUnitTest[27988:903] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[NSURL initFileURLWithPath:]: nil string parameter’ Irony is I have searched the whole project & I dont have any similar line of code that […]

how to set the selected check mark as ticked in tableview cell swift 3.0

I am using one UITableView to select the country with tick mark. But when I move to other screen and when I come back my check mark is invisible. It seems like the country what I am selecting is fine, But after I move to other screen an come back, The selected tick mark is […]

iOS: Autosizing an UIImage programmatically

I have an UIImage in my app, and I had to uncheck the auto layout box and set autosizing with the options shown in the image below so the image will show properly in both screen sizes (3.5 inch, and 4 inch) My question is, how can I set these options in code? I tried […]

How to make a mac application support both 32bit and 64 bit systems

I have created one mac application. It is showing 64bit as system requirement. but the app can run in 32bit systems also. When I checked the Build Settings of the application. I found: Valid Architecture : i386 x86_64 and according to my knowledge these are intel based 32/64bit systems. But I want to make my […]

Can I use pushViewController with UISegmentedControl?

I want to use pushViewController with UIsegmentedController to push to other view and xib. Can I do that in xcode 4 ??? If I can , Could you guide me please ? Here is some code that I try.But won’t work. -(IBAction) segmentedControlIndexChanged:(id)sender { if ([sender selectedSegmentIndex] == 0) { BDshelveController *shelve_page = [[BDshelveController alloc] […]

EXC_BAD_ACCESS right after touchesBegan

I have started a very simple project to learn iOS programming, but I get EXC_BAD_ACCESS after touchesBegan. You can download the project from DropBox here . I basically have a UIView subclass that should draw circles wherever the user is touching. Very simple but I cannot make it work. Any help is highly appreciated. Thanks! […]

Array from File in XCode

Am am making a task organizer iOS app. You type a task and it is saved in an array. I wanted people to be able to share the tasks between Phones so i added a way to save each Array. Right now I am using my idea locally. The page has a title and a […]

gradient cut from top to bottom

This is a follow up question to – gradient direction from left to right In this apple refection sample code, Apple Reflection Example when the size slider is moved, the image is cut from bottom to top. How can I cut it from top to bottom when the slider is moved? I am trying to […]

CLLocationManager didUpdateToLocation checking failing

I am trying to get the location coordinates using CLLocationManager. Here is my code – (void)viewDidLoad { [super viewDidLoad]; //instantiate location manager and set delegate self.locationManager=[[CLLocationManager alloc]init]; locationManager.delegate=self; // can be set to 100m,1km,3km etc. //locationManager.distanceFilter=10.0f; locationManager.desiredAccuracy=kCLLocationAccuracyNearestTenMeters; //start updating the delegate [locationManager startUpdatingLocation]; } -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{ // Check if the coordinates […]

UItextView Justify Paragraph in Iphone

I want to justify a paragraph using UITextView in an iPhone using xCode. What property should I change to do this. Thanks In Advance