Swift framework

1

Good, a few months ago I had started to learn Swift, but since I did not understand where the NSString classes came from, NSArray, for example, I stopped learning. Nowhere did I find the answer to my doubt, that's why I come here to ask them and ask if they would explain the following (I'm going to buy it with Java, because that's what I know):

1. What framework does Swift use? Which of all the frameworks is like Java with the Standart Edition (SE)? On the apple page they put the following:

As I understand the frameworks are 5 ... but within each of them there are more or what are they?

Another question, related to the same, I use print () ... what object am I using ??? The method of which instance or object is?

    
asked by MatiEzelQ 18.03.2016 в 20:08
source

1 answer

2

You're confusing concepts. I will try to explain it to you in the simplest way possible:

To begin with, Swift is not a framework but rather a programming language, just like Objective-C, Java or C ++. Well, having this clear, a framework is just a series of methods / functions written in a specific language to simplify tasks, either because they are repeated often or because it would be complex to implement them.

  

An example of a complex framework is CoreBluetooth . If you had to   program on your own each of the functions that the   framework, you would go crazy, since it is low level hardware and it would be   non-viable. Instead, thanks to having a framework, just write   a few methods you can find iBeacons and interact with them, for example.

Well, what you show us in the images, they are not more than all the frameworks that iOS incorporates so you can develop applications for the iOS platform. That is, MapKit allows you to interact with Apple's maps, HealthKit allows you to see mobile health data, UIKit interfaces, etc.

About the classes you mentioned, NSString or NSArray are part of the Foundation framework which is the basic framework that you will need to be able to do basic operations with strings, for example.

And finally, because you do not understand what a class is, do not be discouraged, go ahead and try to learn that on the Internet you have everything!

    
answered by 18.03.2016 / 21:01
source