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

Enterprise Application Not installing on iPhone 5s

I have an enterprise application that is deployed via a web service. This application has installed on devices previously, but now it is refusing to install on all but one device. Many of my colleagues have downloaded the application without a problem through our web service, all this is, is a simple link on a […]

AVAssetWriter How to create mov video with no compression?

I’am creating a video from an array of images. The purpose of my work is to create a .mov video with no compression. I have see in developer library that it exist a key “AVVideoCompressionPropertiesKey” but I don’t know how to specify no compression with this key. Could you help me please? Here is my […]

How to connect two view controllers to one button in storyboard?

Up to now, there is a button in a view controller (let’s call it Main View Controller). What I want is: if it satisfies a certain condition, when I press the button, the segue would lead to View Controller A; if not, when I press the button, it would lead to View Controller B. But […]

Missing localization in Xcode 6.1

Since update to Xcode 6.1 yesterday there is no correct localization of apps in the iOS Simulator. I switched the language and region to German/Germany and my apps are still in English and only English keyboard is available. Localization was fine in Xcode 6.0.1 and iOS 8.0 Simulator. Does anybody have similar problems?

Swift Calculate MD5 Checksum for Large Files

I’m working on creating the MD5 Checksum for large video files. I’m currently using the code: extension NSData { func MD5() -> NSString { let digestLength = Int(CC_MD5_DIGEST_LENGTH) let md5Buffer = UnsafeMutablePointer<CUnsignedChar>.allocate(capacity: digestLength) CC_MD5(bytes, CC_LONG(length), md5Buffer) let output = NSMutableString(capacity: Int(CC_MD5_DIGEST_LENGTH * 2)) for i in 0..<digestLength { output.appendFormat(“%02x”, md5Buffer[i]) } return NSString(format: output) } […]

layer.renderInContext doesn't take layer.mask into account?

I’m trying to render some UIImages into 1 single image that I can save in my photo album. But it seems to as if the layer.renderInContext doesn’t take a layermask into account? Current behavior: the photo saves, and I see mosaicLayer, without the masking effect of maskLayer. Expected behavior: the photo saves and I see […]

how to use

I’d like to stretch a image with size 170×50 and show it in an image view with size 240×140. The original image looks like: I want to keep the four corners and only stretch the center part. I use the following code: UIImage *originalImg = [UIImage imageNamed:@”ImageNamed”]; UIImage *resizeImg = [originalImg resizableImageWithCapInsets:UIEdgeInsetsMake(20 ,10, 10, 10)]; […]

Hold NSOperationQueue until previous operation completes

I want to perform few operations and need to start the next operation only upon completion of the previous one. The operation I’m adding will send async call to the server and receive data. I want to start the next operation only after the first call to the server finish receiving data from the server. […]

Safe way to render UIVIew to an image on background thread?

I’m creating small tile images to be stored on disk and displayed to the user. Here is my current process for doing this: Create a viewcontroller that represents the UI I want to show onscreen Get the view from the viewcontroller and render an image from it Save it to disk and display it onscreen […]

How to have a handler to repeat UIView animateWithDuration?

I’m using UIView class method animateWithDuration for repeating my view animation. How can I have a handler that could be used to stop this animation later? For example, repeated animation starts in one method and I need to stop it later from another method.