NSOpenPanel Hiding Xcode Debug

I am working on an app that uses NSOpenPanel. The problem is that during debugging with Xcode the panel does not fully hide itself. A white rectangle is left being displayed over everything else. I have tried using a completion handler to resolve thi...
more »

2017-04-17 23:04 (0) Answers

Create IBAction for CollectionViewCell

I've got a collection view with multiple cells created programically. I want to update a variable to a different value when the user taps a specific cell. So eg: Cell 1 is tapped -> var test = "cell1" , cell2 is tapped var test = "cell2". Usually I'd...
more »

2017-04-17 18:04 (2) Answers

How can we hide the Sensitive Data in xCode iOS

I am new to iOS Development and have no much idea about secure iOS coding and my requirement is to hide API & Secrete Key in my xCode project. Is there any secure technique or location in xCode where I can keep the data so the it would not be acc...
more »

2017-04-17 09:04 (1) Answers

How to play .mts file in iOS

Currently im working with a wifi-camera device, which is able to send only videos in .mts format. As i have investigated in google, it leads to conclusion that it is not possible to play the video in iPhone or may be using Objective C. Now my probl...
more »

2017-04-17 08:04 (1) Answers

animating path in swift 3

following code creates a red 270 degree ring let result = Measurement(value: 270, unit: UnitAngle.degrees) .converted(to: .radians).value let circlePath = UIBezierPath(arcCenter: CGPoint(x: 200,y: 200), radius: CGFloat(90), startAngle: CGF...
more »

2017-04-16 11:04 (1) Answers

How to get rid of border of UISearchBar?

The Problem I have a UISearchController embedded within a UIView. The searchbar takes up the entire size of the view. However, there's this grey border that I can't figure how to get rid off. I want the search bar to take up the entire size of the v...
more »

2017-04-16 05:04 (1) Answers

Can't visualize UIBezierPath in Playground

I remember there was a time that I can visualize a bezier path in Xcode Playground, but with the latest version (8.3.1) that ability is gone? import UIKit let path = UIBezierPath() path.move(to: .zero) path.addLine(to: CGPoint(x: 100, y: 100)) Al...
more »

2017-04-16 02:04 (1) Answers

How to import and use big CSV files in Swift

I am building an iphone app that will provide the user with information about public transport departure times. Now I have all of these data stored in huge CSV files (120 000 rows in total, about 60 MB). What is the most convenient way to import thes...
more »

2017-04-15 22:04 (0) Answers

NSLayoutConstraints on objects swift 3.0

Currently I am using this line of code to set the origin on a UILabel at the top left corner... addConstraint(NSLayoutConstraint(item: messageLabel, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1, constant:...
more »

2017-04-15 20:04 (3) Answers

SpriteKit build rope function not working

Here is my code: var red: SKSpriteNode? var redHolding = false ///// // MARK: didMove ///// override func didMove(to view: SKView) { physicsWorld.contactDelegate = self if let r = self.childNode(withName: "red") as? SKSpriteNode { red = r ...
more »

2017-04-15 17:04 (1) Answers

How do I attach Scroll View's delegate method?

I have collection view which contains a scroll view. Scroll view has custom class which has scrollViewDidScroll function. Whenever I scroll, the scrollViewDidScroll method doesn't trigger. I tried attaching it's delegate to it's own class, and all t...
more »

2017-04-15 12:04 (1) Answers

Firebase configuration fails - Swift

In my application I'm successfully using Firebase and in AppDelegate I do the setup: // ### Initialize Firebase FIRApp.configure() Now I do some unit tests on related target and when I launch it I get errors: 2017-04-14 14:53:22.351 MyProject[287...
more »

2017-04-14 15:04 (3) Answers

Strange error on click on Button (Swift Xcode)

I'm a newest Swift programmer. I'm building a simple app to iOS system. I have a strange error when I try to click on one button of my application. This is the first View: If I try yo click on "Kit Button", I have this error but I don't know I ca...
more »

2017-04-14 11:04 (1) Answers

How to change variable data type on Subclass

I am subclassing say for example UITableView and I want change one of it's variable to suit a protocol delegate of mine. @objc protocol SomeTableViewDelegate: class, UITableViewDelegate { /** some documentation here */ optional fu...
more »

2017-04-14 10:04 (1) Answers

React Native - NSInvalidArgumentException

I am using react-native-piechart to render a single chart. I have added ART.xcodeprojto my Libraries. I also added libART.a to my Build Phases > Link Binary With Libraries. When I render the chart, my application crashes. When running react-nati...
more »

2017-04-13 17:04 (1) Answers

swift 3 selector with arguments

I searched a lot for selector method in Swift 3, but I have lots of confusion for it. 1) what is difference between Selector & #selector? 2) if I write with Selector, the function is outlined means not available? 3) How to pass a parameter wit...
more »

2017-04-13 13:04 (2) Answers

Unpredictable SceneKit behaviour?

I have a SceneKit SCNSceneRendererDelegate that implement the following method : - (void) renderer:(id<SCNSceneRenderer>)renderer didRenderScene:(SCNScene*)scene atTime:(NSTimeInterval)time { static NSUInteger coun...
more »

2017-04-13 12:04 (1) Answers