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

Can't assign a google maps map to custom view

So I followed this guide on how to add a Google map to an iOS application and it all works fine. But what I want to do is assign the map, not to self.view but a custom view I dragged out on to the storyboard inside(?) the other view, because when adding the map to […]

Declare interface inside implementation file (Objective-C)

In the last verson ox xCode (4.3) I’ve seen that prefdefined templates (such us Master/Detail template) in which the interface declaration is made in the .m file. For example, in the file MyFile.h there is: @interface MyFile @property (nonatomic, retain) NSString *someProp; @end And in the MyFile.m file there is: @implementation MyFile @interface MyFile { […]

Global Variables in Objective C

I have a counter which I use to get an object at that counters index and I need to access it in another class. How are static variables declared in Objective C?

didReceiveRemoteNotification take user to the correct view

I’ve got a chat application where my server sends out push notifications when a new message is send. The problem I’m having is how can i take the user to the correct view? Im sending a channelID in the push notification but how can i retrieve it and take the user to the actual conversation? […]

Parsing SVG path in objective-c

i need to parse some paths of an SVG file, they are simple lines. When retrieving the data i end up with this string: m 0,666.6479 254.28571,0 According to SVG specifications m denotes a new current point then the following 2 numbers are the position and the laters are relative positions to the first one. […]

Printing Pdf using AirPrint causes small output

I trying to print a pdf with UIPrintInteractionController that it load in the UIWevView. The good news is that i can print the bad is that the output of the print is to small. any help would be appreciated 🙂 – (IBACTION) printPDF { if ((!_webView)) return; UIPrintInteractionController *controller = [UIPrintInteractionController sharedPrintController]; void (^completionHandler)(UIPrintInteractionController *, […]

Get Current User from root mode?

I am writing a login item and I am trying to find if its possible to get the current user. Lets say, I have logged in with user “Test” and when I execute the exe with root privileges and if I use char *user = getenv(“USER”); user is “root”. My expected answer is “Test”. How […]

manually add UITabBar to UITableViewController

I have a standard app with a navigation controller managing several UITableViewController classes. I want to add a UITabBar to the root view (a UITableViewController) to manage filtering the selection of objects showin in the UITableView. I dont want/need a UITabBarController. The UITabBar is only for functionality and UI (radio-button style selection and familiar tabbar […]

Draw a shadow which is hidden under the semi-transparent view?

I have a semi-transparent view with a drop shadow. I mocked it up in photoshop, which doesn’t draw the shadow under the object. Then I made it in xcode, but it obviously does draw the shadow underneath. I was wondering if there’s a way to avoid this. In other words – have the shadow only […]

Collection <NSCFSet: 0x1b0b30> was mutated while being enumerated. How to determine which set?

I’m doing a bunch of core data inserts and after 20k or so inserts with saves every 1-2k I get this error: Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘*** Collection <NSCFSet: 0x1b0b30> was mutated while being enumerated.’ I’m trying to figure out which NSSet is causing this. I’ve done a search and the […]