Interviews for an iOS Developer??

If you’re looking for a nice developer job, first thing you should check is your basic programming knowledge, of course. Or maybe, you are not looking for new opportunities. –> You just don’t want to lose flexibility of programming skills on a specific language or algorithm know-how. Best thing you can do is simply EXERCISING.

There are several websites you can use to solve programming problems on different areas (such as Data Structures, Algorithms, AI, Databases or Security) by using different programming languages. (From Python, Go, ADA to Swift) These websites are really good for improving whiteboard coding skills.Read More »

Advertisements

What happened to Macros in Swift? Using Xcconfig files and Custom Flags for Clean Project Settings

Macros were cool, they are already cool for Objective-C developers. (If you have an Objective-C project, this article is for you.) But in Swift, you should choose a different way to manage your project configurations. Because they are not available anymore.

But we have other cool things like xcconfig files and custom flags.

1 – Lets start with Config files…

You can use config files to define project variables and set different values for these variables under different project schemes.Read More »

Styling Views on iOS

What if I say you can use styles in iOS?

Yes, we can steal some features from Android for iOS.

Font family, size, text color, background color, background image .. Selecting all style attributes from Interface Builder over and over again can be a pain in the ass.

So, how can we do this? What are the benefits of using styles in iOS?

One day, your boss, your client or even you “MAY” want to change design of a part of your iOS app or even whole application. Your red buttons now should be green and non-bordered.

One day, Apple “MAY” show up with different font family on new iOS version and you can’t use this system font as default, but you realise some and big part of your labels, buttons are set from Interface Builder as system.Read More »

Advanced Permission Management for iOS Applications

Mobile applications ask permissions to access user’s information or user’s phone features. These permissions can be accessing camera, microphone, location, phone contact list, calendars, photos, reminders etc.

You should define your permission asking strategy wisely. You can prefer either asking permission right before using this-exact feature or you can show information why you really need these permissions and direct your users to your application’s settings page or both. If a user will not continue using your app without giving permissions, it’s nice to show information why you need it and what your application offers the user by using these features, then direct users your application settings page.Read More »

Build Your Own Framework

Coding is like playing with legos. There are so many cases that you can -and probably you should- use same lego piece for different structures, multiple times.

“If the code appears more than once, it probably belongs in a framework.” WWDC14

Apple introduced Cocoa Touch Frameworks in 2014 – the same year as iOS8 is launched . If you haven’t watched yet, I strongly recommend you to watch Building Modern Frameworks session.

Frameworks are best way to reuse your code and share with multiple projects. For instance, @Apple Health app has its own framework – HealthKit – and other developers can use HealthKit.framework by linking it with their projects.Read More »

Swift – Enumerations and Structures ( Part 5 )

enum for enumerations

In Swift, enumerations can have methods like all other name types. In enumerations, the list have raw values and All you have to do is defining first raw value. The rest of the raw values will be assigned in order. You can reach this raw value by calling rawValue property.

Defining your enumeration

enum BeatlesCollection : Int {
    case AHardDaysNight = 1964
    case Help, YesterdayAndToday, MagicalMysteryTour, TheBeatles, YellowSubmarine
    case LetItBe
    
    func yearDescription() -> String{
        switch self{
        default :
            return String(self.rawValue)
        }
    }
    // You can add additional functions here.
}

Creating variable from an enumeration valueRead More »

Swift – Objects & Classes ( Part 4 )

class is for defining your classes.

You can add properties and functions inside of your class as usual. As initialising your class, you should add/implement init method in your class.

class Name_of_myclass {
    var intVariable: Int = 0
    var stringVariable: String

    init(intVariable: Int, stringVariable: String) {
       self.intVariable = intVariable
       self.stringVariable = stringVariable
    }

    func anotherFunction(){
        //Body of function
    }
}

Creating an object and calling its function or setting its value is very simple. First line simply creates an object of Name_of_yourclass by using parentheses and assigns it to a variable.Read More »