You have your storyboard ready and you have created the necessary segues. Great! Now how do we trigger these segues programmatically? There are many different ways to do it. One of the nicer ways to do this is by connecting two scenes in a storyboard using a segue that is not attached to an action. After that, you can programmatically trigger the segue inside your view controller. The way you do this is by control-dragging from the file owner icon at the bottom of the storyboard scene to the destination scene. Continue reading “How To Trigger A Segue Programmatically In iOS”
Tag: app
Dismissing The UITextField Keyboard
Let’s say you are designing an iOS application which takes user input using a text field. When you add a text field to your storyboard and run your application, you will see that when you tap on the text field, the keyboard pops up automatically. But when you tap the return key, they keyboard doesn’t go away. As it turns out, the popping up of the keyboard is taken care of when you add the UITextField, but dismissing the keyboard is up to you. Here’s how you make it go away after you are done taking the input from the user: Continue reading “Dismissing The UITextField Keyboard”
iOS App: Separator Lines And Back Button In Master-Detail Application
When you create a master-detail application in iOS, a few things appear by default. If you notice it, you will see that the empty cells are separated by lines. But we want the separator lines to appear for items that are there in the table. Also, you will notice that the back button in the detail view contains the title by default. What if we want it to say something else? Perhaps not say anything at all. How do we do it? Continue reading “iOS App: Separator Lines And Back Button In Master-Detail Application”
How To Load Different XIBs Based On The Device Type?
What’s with all the different sizes of the iOS devices? I mean, sure we have autolayout feature that takes care of things in general. But if you want real aesthetic perfection, then you are better off having a separate XIB for each screen size. If you create a universal app, Xcode automatically creates two separate XIBs for iPhone and iPad. But if you want to differentiate between the 3.5 inch screen and the 4 inch screen on the iPhone, you should create a new XIB and add it to your project. You should of course name them accordingly. You can then load the XIBs by checking for the device type as given below. Continue reading “How To Load Different XIBs Based On The Device Type?”
Transition Effects In iOS Apps
One of the more visually appealing aspects of iOS development is the crisp transition effect. Whenever you see a beautiful iOS app, it has all the elements interacting with each other seamlessly with gorgeous transitions and other visually appealing effects. If you have tried your hand at building one of these apps, you must have noticed that there are a couple of default options available, like flip or curl. But how do we go past this? How do we build all the fancy transition effects into our app? There are actually two different approaches you can follow. Continue reading “Transition Effects In iOS Apps”
Storyboards vs XIBs
The concept of storyboarding was introduced by Apple in iOS 5. This was the first major deviation from using the interface builder to build iOS apps. Storyboards were created to help developers visualize the flow of the application. It is a lot like having a bunch of XIBs, but in a single file. You can also create custom transitions via code that will change dynamically if needed, much like you can with XIBs. But a lot of people who are new to iOS development get confused between XIBs and Storyboards. What should you use for your project? Does it matter one way or the other? Continue reading “Storyboards vs XIBs”
Rooting Your Phone
A lot of Android devices are being activated everyday. We hear the term ‘rooting’ floating around all the time. Most of the people don’t bother to tinker with their phones. They just want to enjoy their device as it is. Some people think that rooting their phone will break the software or damage their phone in some way, and so they don’t want to mess around. What exactly is rooting? Do we even need to root our phones? If so, why exactly do we need to root our phones? Continue reading “Rooting Your Phone”
Demystifying Android
Look around you and you’ll see a lot of Android phones. In fact, Android has the biggest market share in the smartphone market. People don’t really know much about what happens under the hood. Laymen are excused from this because they will probably not benefit much from having this knowledge. But what about techies? Can we really afford to be equally ignorant about this? I have been fiddling with Android for quite some time now and I thought I should just elucidate a little on the world’s best-selling mobile operating system from a tech point of view. Continue reading “Demystifying Android”