Swift Touches not recognized in static table view

I have a table view with static cells. My second section has a header but no rows, under that section I have a label that when pressed should call sendEmail() function which will open the email app on their device. I've tried using a label, text v...
more »

2017-03-20 21:03 (1) Answers

Facebook App Invites Swift No Notfications

Im trying to invite users to my app using facebook. The facebook invite content is displayed correctly by calling FBSDKAppInviteContent(). The problem is when i select a friend, they dont receive a notification(on facebook) or a push notification...
more »

2017-03-20 16:03 (0) Answers

Generic class type as parameter

I'm trying to pass a class type as a parameter to compare it to the items in my toolbar: private func getButton<T>(_ type: T.Type) -> UIBarButtonItem? { guard let bItems = parent?.toolbarItems else { return nil } return bItems.inde...
more »

2017-03-20 14:03 (0) Answers

Break a loop inside a animation block

I'm trying to break a for-loop after a completed UIView animation. Here is the following snippet: public func greedyColoring() { let colors = [UIColor.blue, UIColor.green, UIColor.yellow, UIColor.red, UIColor.cyan, UIColor.orange, UIColor.magent...
more »

2017-03-20 13:03 (2) Answers

Swift Generic api response wrapper

I am trying to make response wrapper for my api response like below class ResponseModel<T> { var Status: String! var Errors: [NSDictionary]? var Message: String? var ErrorCode: NSNumber? var Data: T? } I tried Object...
more »

2017-03-20 10:03 (0) Answers

How to create Airbnb iOS App Explore tab?

I'm trying to create a feed page similar as the screenshots from Airbnb app. I started off with a UITableViewController and added animation to the header on scroll; the header is the turquoise-color area there. Now I want to add those page tab...
more »

2017-03-20 10:03 (1) Answers

AVAsset: Rotation issue

I have used the following codes to merge multiple video to one final video and to remove sound from the final video. //for merging multiple videos func mergeMultipleVideos() { let composition = AVMutableComposition() let videoTrack = ...
more »

2017-03-20 10:03 (0) Answers

Added UIBarButtonItem cannot be triggered

language: swift 3.0 os: macOS 10.12.3 xcode: 8.2.1 Here is a blank Storyboard with a ViewController. And below is the code: import UIKit import WebKit class CommonWebViewViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { ...
more »

2017-03-20 06:03 (0) Answers

Using CoreMIDI input with AVAudioUnit

I'm trying to achieve something that seems like it should be simple: listen for MIDI messages in a Mac app, and use these to play notes from an existing AVAudioUnit instrument. Hypothesis: I need to write a bridge between the MIDIReadBlock associate...
more »

2017-03-20 01:03 (0) Answers

Swift, ios 10 UIButton Border

I was developing in Swift 3 and I had a little problem with a UIButton. I will try to explain my problem. First I created my UIButton: let Button: UIButton = { let button = UIButton(type: .system) button.setBackgroundImage(UIImage(named: "bu...
more »

2017-03-20 00:03 (1) Answers

How to use wildcard in Firebase?

This is my Firebase database structure: ft-records userX@gmail_com 2013-01-01 00:00:00 GMT addedByUser: "userX@gmail.com" notes: "Boooo" time: "2013-01-01 00:00:00 GMT" 2013-01-02 10:00:00 GMT addedByUser: "...
more »

2017-03-19 23:03 (1) Answers

UITextView Hyperlink to Internal WebView

UITextView allows tappable attributedText based hyperlinks.The user interaction with the link can be intercepted by implementing the delegate method. textView:shouldInteractWithURL:in: which has two variations, for iOS 10 and one for iOS 9 as below. ...
more »

2017-03-19 22:03 (1) Answers

Creating UIImageView with a tag. Swift 3

I have an int n that holds value. I want to create a loop that will create UIImageViews with consecutive tags. My code: var n:Int = 1 if arrayOfEmojis.count != 0 { for emoji in arrayOfEmojis { let emojiView = self.view...
more »

2017-03-19 22:03 (1) Answers

Downloading file with swift and objective-c

I have 2 projects with 2 different languages. Objective-c project and swift project to download the file from url. The problem is that in objective-c the file is downloaded more quickly than in swift. Why is this happening? How to fix it? my swift...
more »

2017-03-19 14:03 (1) Answers

Xcode does not find C++ static library

So I had some issues with this before but I deleted my old question and updated it to this one. Here it goes: I want to use a C++ Library in my iOS Swift project. With the help of this community I compiled my library as a static library (.a file). N...
more »

2017-03-19 13:03 (1) Answers