Animating cell more than once

I have a uitableview cell and it will animate when the cell is displayed. These cells are in tableviews and these tableviews are tabs of a uitabbarcontroller. But if a user presses one of the four tabs for the first time then the cells will animate, ...
more »

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

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&g...
more »

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

Scrollview to not allow scrolling back 2 images

So if any of you have ever used spotify (non premium) you might have noticed how you cannot scroll back to last song you listened to. Now I wanted to do that in a scrollview. I have created and initialized a scrollview that pulls from an array of ima...
more »

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

How can I hash a file on iOS using swift 3?

I have a number of files that will live on a server. Users have the ability to create these kinds of files (plists) on-device which will then upload to said server (CloudKit). I would like to unique them by content (the uniquing methodology should be...
more »

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

Handling PHP response in swift

I am new to swift and I have somehow managed to run some test programs. I have a working API for android which returns response in plain echo statements and it works just fine. Now I wish to use the same API for IOS but I get an error. Please help ...
more »

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

UIScrollView does not fit with constraints

I'd like to use a scrollView to move the nested view content up when the keyboard appears. (Maybe you know a better solution ?) So, I put a UIScrollView into my UIViewController and a UIImageView into my UIScrollView. The problem is my UIScrollView ...
more »

2017-03-21 14:03 (2) Answers

create layout using CSS for following design

We are trying to achieve the following layout based on dynamic html string. Here we are facing when it is second page content layout not going up & we can not add images in first page. The sample code tried in native code as below: func setDa...
more »

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

Two init functions with UIColor ios

I was applying colors to the label and found out that we have two functions doing the same thing. Can anyone explain me what is need of these two functions, why can't we have only one function? Normally used :- public init(red: CGFloat, green: CGFl...
more »

2017-03-21 14:03 (2) Answers

Having trouble linking my timer buttons (Xcode)

UPDATE: Thank you to everyone that offered a solution. And it appears XCode was just being a bit buggy because I came back to my project and it's working fine now. Again thank you! first thank you to anyone who offers some help. I am attempting to ...
more »

2017-03-21 01:03 (2) Answers

Generic core data fetch request

I am trying to create sort of a generic wrapper for simple core data fetches. What I wanted to achieve, is, instead of writing multiple redundant methods that look like this: func loadNSMOSubclass() -> [NSMOSubclass] { let fetchRequest: NSFe...
more »

2017-03-21 00:03 (0) Answers

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