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

How would I send an NSArray filled with objects over a HTTP POST?

I have a product/shopping list (consisting of product objects with a name, product_id etc) on the iPhone side. I wish to send this list to the server where I will compare the list on the server with the one from the iphone (to merge the changes made and send the merged list back to the […]

Subviews layer transform and layoutSubviews

my question is related to UIView/CALayer: Transform triggers layoutSubviews in superview Where is reported that, from a TSI reply from apple: Generally, changing a geometric property of a view (or layer) will trigger a cascade of layout invalidations up the view hierarchy because parent views may have Auto Layout constraints involving the modified child. Note […]

Add a close button to NSTabviewitem

I have a application with a tab view when the user clicks in the menu for example “client data” I generate a tab programmaticaly. Now I want to subclass the tab view to add a close button for each NSTabviewitem. If you don’t have an answer you could help with documentation or sample code

How to handle NSTableView Drag and Drop for multiple rows

I’m fairly new to Cocoa dev, but implementing single row drag and drop within my NSTableView was fairly straightforward. However I’m now having a hard time getting it to work right when multiple rows are selected. It seems to work without fault when all the selected rows are sequential, but it fails when, for example, […]

Algorithm Code Optimization: Find the Equilibirum: Find an index in an array such that its prefix sum equals its suffix sum

Here’s my Task Description: A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 ≤ P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices, i.e. A[0] + A1 + … […]

Weird Error With Apple Script Bridge – iTunes

I’m trying to create an ObjC application that will control iTunes. I need a method that will return an array of all the playlists in iTunes. I’m getting the most bizarre, unhelpful error message ever… First the code: #import “MusicControl.h” #import “iTunes.h” @implementation MusicControl – (SBElementArray *) playlists { // Create iTunes Object iTunesApplication *iTunes […]

iphone: How to show different image for every pin point on MapKit?

I want to put Start and End image with overlay in an iPhone/iPad application. I have start and end Lattitude and Longitude values and want to draw overlay between start and end points and put start image on Start point and End Image on End point. I have googled but What I found is MapKit […]

Send image and text in email from within app

How can I send an image along with text, which is in the form of tabular data, in an email from within my app? Please help and make suggestions. Thanks.

Is there any way to improve time between shots with AVCaptureStillImageOutput?

I currently use the following code to shoot a series of images: – (void)shootSeries:(int)photos { if(photos == 0) { [self mergeImages]; } else { [output captureStillImageAsynchronouslyFromConnection:connection completionHandler: ^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) { NSLog(@”Shot picture %d.”, 7 – photos); [self shootSeries:(photos – 1)]; CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(imageDataSampleBuffer); CVPixelBufferLockBaseAddress(pixelBuffer, 0); int dataSize = CVPixelBufferGetDataSize(pixelBuffer); CFDataRef data = […]

Cocoa-Touch, Core Data: How do I delete all objects for an entity?

I have an app, using Core Data with a SQLite store. At some point I’d like to remove all objects for a few entities. There may be close to a thousand objects. From what I can tell via google and the official docs, the only way to delete objects is to [managedObjectContext deleteObject:(Entity *)] for […]