iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

Polyline not drawing from user location (blue dot)

– (void)viewDidLoad { [super viewDidLoad]; CLLocationCoordinate2D currentLocation; currentLocation.latitude = self.mapView.userLocation.location.coordinate.latitude; currentLocation.longitude = self.mapView.userLocation.location.coordinate.longitude; CLLocationCoordinate2D otherLocation; otherLocation.latitude = [lati doubleValue]; otherLocation.longitude = [longi doubleValue]; MKPointAnnotation *mka = [[MKPointAnnotation alloc]init]; mka.Coordinate = otherLocation; mka.title = @”!”; [self.mapView addAnnotation:mka]; self.mapView.delegate = self; MKMapPoint *pointsArray = malloc(sizeof(CLLocationCoordinate2D)); pointsArray[0]= MKMapPointForCoordinate(currentLocation); pointsArray[1]= MKMapPointForCoordinate(otherLocation); routeLine = [MKPolyline polylineWithPoints:pointsArray count:2]; free(pointsArray); [self.mapView addOverlay:routeLine]; […]

changing the MFMailComposeViewController navigationBar title font

I have a MFMailComposeViewController and when I’ve set the subject it also sets it as the subject. The question is how do I customize the font of the title and color? MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; [picker setSubject:@”Feedback for MyApp”];

Accessing DOM Webkit Objective C

Could someone who is familiar with webkit please explain or point me in the right direction as to why the following code does not work What i’m trying to do is load a page, have webkit parse it and simply print out the title. Here is what i’ve got: #include <iostream> #include <WebKit/WebKit.h> using namespace […]

How to resolve Undefined Symbols error?

I’m getting this error Undefined symbols: “.objc_class_name_MyClass”, referenced from: literal-pointer@__OBJC@__cls_refs@MyClass in infoViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status When referencing the static method below: [MyClass ClickComment:self.navigationController]; MyClass is defined in a static library that I’m referencing in my app project. When I start typing “[MyClass “…, I get message hints. The […]

How to fetch pages of results with RestKit?

I’m using RestKit 0.10.1 and I’m looking for some sample code for dealing with web service that paginates results. I’ve got GET requests fetching the first page with no parameters and sticking them into a UITableView. Ideally when I get to the bottom of a page it would fetch the next page and insert those […]

Radio button logic in UItableViewCells

Hey I’m working on a screen where user have option groups for example “Drink” which is title of section in my tableView, and their choices are “7up”, “coke”, etc which are cells of my table. Now every Option Group choice (every cell in order words) has one radio button. I want to implement this. I’m […]

Animation CAShapeLayer

I draw a graph with this code: CAShapeLayer *curentGraph = [CAShapeLayer new]; CGMutablePathRef linePath = CGPathCreateMutable(); curentGraph.lineWidth = 3.0f; curentGraph.fillColor = [[UIColor clearColor] CGColor]; curentGraph.strokeColor = [colorGraph CGColor]; for (NSValue *value in arrOfPoints) { CGPoint pt = [value CGPointValue]; CGPathAddLineToPoint(linePath, NULL, pt.x,pt.y); }; curentGraph.path = linePath;CGPathRelease(linePath); [self.layer addSublayer:curentGraph]; and it looks like this But I […]

iOS: How to draw a circle step by step with NSTimer

I’d like to draw a circle without filling (only border of the circle) step by step (like animated timer). 1 spin is equal 1 day (24 hours). I really don’t know what to do. Steps I’ve made 1) I’ve tried (it’s too wide line of progress) 2) I’ve tried to draw a circle with […]

How to use Oauth properly

I haven’t made much progress, so rather then look for an answer to the error stated in my original question, I think my problem would best be solved by some overall instructions on how to use Oauth properly. Please look below to question reformulated. ORIGINAL QUESTION I’m using the cocoa-wrapper api for soundcloud on my […]

Checking a null value from Json response in Objective-C

[ { “AT” : null, “EA” : null, “AD2” : “”, “OP” : null, “AdsLst” : [ ], “EMs” : null, “ND” : { “MN” : null, “FN” : “Sony”, “LN” : “J” }, “ZP” : “23456”, “CT” : 1, “PP” : 0, “cId” : 161464, “Pos” : null, “WPExt” : null, “OS” : 0, […]