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

++ is deprecated it will be removed in swift 3

++ will be deprecated in swift 3 variable++ can now be written as variable += 1 How can I rewrite ++variable. Please recall difference between ++variable and variable++ syntax

Swift 3 iOS compatibility

I’m new to Apple developing and soon I will distribute my app via AppStore. So now I’m using Swift 3 and by default the deployment target is set to iOS 10.0 It means that I won’t be able to make it run for example on iOS 8-9? ‘Cos in Swift 3 I use new funcs […]

Difference between dispatch_async and dispatch_sync on serial queue?

I’ve created a serial queue like this: dispatch_queue_t _serialQueue = dispatch_queue_create(“”, DISPATCH_QUEUE_SERIAL); What’s the difference between dispatch_async called like this dispatch_async(_serialQueue, ^{ /* TASK 1 */ }); dispatch_async(_serialQueue, ^{ /* TASK 2 */ }); And dispatch_sync called like this on this serial queue? dispatch_sync(_serialQueue, ^{ /* TASK 1 */ }); dispatch_sync(_serialQueue, ^{ /* TASK 2 […]

Retrieve custom prototype cell height from storyboard?

When using “Dynamic Prototypes” for specifying UITableView content on the storyboard, there is a “Row Height” property that can be set to Custom. When instantiating cells, this custom row height is not taken into account. This makes sense, since which prototype cell I use is decided by my application code at the time when the […]

Is programmatically inverting the colors of an image possible?

I want to take an image and invert the colors in iOS.

iOS Swift Button action in table view cell

I am trying to run an action for a button being pressed within a table view cell. The following code is in my table view controller class. The button has been described as “yes” in an outlet in my class of UITableViewCell called requestsCell. I am using parse to save data and would like to […]

UICollectionView inside a UITableViewCell — dynamic height?

One of our application screens requires us to place a UICollectionView inside of a UITableViewCell. This UICollectionView will have a dynamic number of items, resulting in a height which must be calculated dynamically as well. However, I am running into problems trying to calculate the height of the embedded UICollectionView. Our overarching UIViewController was created […]

NSFetchedResultsController with sections created by first letter of a string

Learning Core Data on the iPhone. There seem to be few examples on Core Data populating a table view with sections. The CoreDataBooks example uses sections, but they’re generated from full strings within the model. I want to organize the Core Data table into sections by the first letter of a last name, a la […]

Simulate force touch / 3D touch on iPhone 6S or iPhone 6S Plus simulators

I am trying to simulate a force touch using Xcode 7 GM on the iPhone 6S or iPhone 6S Plus simulator. In particular, I am trying to simulate the force touch on the icon of the test app which is implementing Application Shortcuts. Let me know if there is a solution to simulate this, I […]

UIScrollView scroll to bottom programmatically

How can I make a UIScrollView scroll to the bottom within my code? Or in a more generic way, to any point of a subview?