Skip to content

Mastering iOS

A developer's search for code greatness

Menu

Primary menu

  • Home

Constants in Objective C

Posted on November 29, 2013 by Vasilica Zmeu — No Comments ↓

When you’re building an app you usually need some values to remain the same for the whole runtime of the app. Instead of using those values everywhere inside your app it is better to define a constant and use the constant instead. Continue reading Constants in Objective C→

Posted in Basics, Good Practices | Leave a reply

iOS 7 in-line UIDatePicker – Part 2

Posted on November 18, 2013 by Vasilica Zmeu — 7 Comments ↓

In part one of this tutorial we’ve seen how to display in-line date picker in a table view with dynamic cells. In this second part we are going to see how to do this for static cells. We will build Continue reading iOS 7 in-line UIDatePicker – Part 2→

Posted in iOS 7, Step by Step Tutorials | 7 Replies

iOS 7 in-line UIDatePicker – Part 1

Posted on October 31, 2013 by Vasilica Zmeu — 12 Comments ↓

One of the new features in iOS 7 is the in-line UIDatePicker. You might have noticed in the Calendar app or in the Reminder app that when you want to select a date for your event, instead of seeing the Continue reading iOS 7 in-line UIDatePicker – Part 1→

Posted in iOS 7, Step by Step Tutorials | 12 Replies

How to sort NSArray with custom objects in it

Posted on October 28, 2013 by Vasilica Zmeu — 2 Comments ↓

Every app has to work with some data and this data is usually structured in custom classes. A music app will probably have a Song class, a chat app will have a Friend class, a recipe app will have a Continue reading How to sort NSArray with custom objects in it→

Posted in Basics, Tips & Tricks | 2 Replies

How to check iOS version at runtime

Posted on October 26, 2013 by Vasilica Zmeu — No Comments ↓

iOS 7 has a very good adoption rate, however you might still want to support people that are running older versions of iOS. You can load different storyboards or xib files, different launch screens and handle API differences. You can Continue reading How to check iOS version at runtime→

Posted in Basics, iOS 7, Tips & Tricks | Leave a reply

How to concatenate strings

Posted on October 5, 2013 by Vasilica Zmeu — 2 Comments ↓

Let’s assume we have these strings: NSString *firstString = @”This is the start”; NSString *secondString = @”of a great”; NSString *thirdString = @” sentence that ends here”; The easiest way to concatenate two strings is by using the stringByAppendingString: method. Continue reading How to concatenate strings→

Posted in Basics, Tips & Tricks | 2 Replies

How to make UITextField move up when keyboard is present

Posted on October 4, 2013 by Vasilica Zmeu — 12 Comments ↓

When the user taps in a text field, that text field becomes the first responder and automatically asks the system to display the associated keyboard. The appearance of the keyboard might obscure portions of the UI that you would like Continue reading How to make UITextField move up when keyboard is present→

Posted in Step by Step Tutorials, Tips & Tricks | 12 Replies

Should IBOutlets be weak or strong?

Posted on September 20, 2013 by Vasilica Zmeu — 3 Comments ↓

You might have noticed that when you insert an IBOutlet directly from Interface Builder you can select whether to have it as a weak or strong property. After a little search in the Apple developer’s library I have found when Continue reading Should IBOutlets be weak or strong?→

Posted in Good Practices | 3 Replies

How to manage the keyboard for a UITextField

Posted on September 19, 2013 by Vasilica Zmeu — No Comments ↓

When you are dealing with UITextFields one thing you need to handle is the showing and hiding of the keyboard. To show the keyboard all you need to do is make your text field the first responder like this: [self.myTextField Continue reading How to manage the keyboard for a UITextField→

Posted in Tips & Tricks | Leave a reply

Use copy for NSString properties

Posted on September 19, 2013 by Vasilica Zmeu — No Comments ↓

When you declare a NSString property it is best to use copy instead of strong. In fact this is true for any immutable class that conforms to the NSCopying protocol like NSNumber, NSArray, NSSet and others. All these classes I Continue reading Use copy for NSString properties→

Posted in Good Practices | Leave a reply

Post navigation

Newer posts →

Primary Sidebar Widget Area

Categories

  • Basics
  • Clean Code
  • Good Practices
  • iOS 7
  • iOS 8
  • Step by Step Tutorials
  • Swift
  • Tips & Tricks
  • UI Elements

Recent Posts

  • The Boy Scout Rule
  • Reading a file in Swift
  • Alerts and action sheets in iOS 8
  • Swift Fun with Timers and GCD
  • 6 things I love about the Swift programming language

Archives

  • May 2018 (1)
  • September 2016 (1)
  • April 2015 (1)
  • March 2015 (4)
  • February 2015 (2)
  • October 2014 (1)
  • July 2014 (1)
  • June 2014 (1)
  • March 2014 (1)
  • December 2013 (2)
  • November 2013 (2)
  • October 2013 (5)
  • September 2013 (3)
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
Copyright © 2023 Mastering iOS. All Rights Reserved.
Theme: Catch Box by Catch Themes
Scroll Up
Enter your name and email to receive new awesome Swift tutorials.
Your information will *never* be shared or sold to a 3rd party.