Im developing an iOS application using the newest version of Xcode. The application are going to fetch data from an webservice using http requests, and the application is kinda big so there will be many different requests. So, im new into with this objective-c so i wonder how do you create a class which can contain methods that can be accessed all over the application just by creating a new instance of that class in an other class and simply call the method inside the classinstance that you just started.
I mean like, lets say we have a class called Communication.
The communication class contains one method which name is login, it takes two parameters. Username and password.
Then i want from my other class call that method using something like.
Communication com = new Communication();
com.login(username, password)
As i said, im kinda new to objective-c so i would appriciate some help.
Communication.h (Header file)
Communication.m (Implementation)
Then using that class would look like this: