I just created a tutorial on YouTube that shows you how you can create scrollable labels
I just created a tutorial on YouTube that shows you how you can create scrollable labels
I thought I’d write about operators a bit in this issue. I don’t like to teach how operators work, but rather show you some cool things that we can do with operators. but then again, many websites do that already. you can just search online and find hundreds, if not thousands of blogs/websites that can teach you how to use operators and how to create your own in Swift. so how can i be different and offer something else? well, we will talk about operators in this issue and how to write your own, but, i will also show you how custom operators are compiled by the Swift compiler.
I have started working on a new project called Swift Weekly. The reasons behind this decisionĀ are plenty. I’ve noticed throughout years of publishing books that the best way to learn is to teach. In my quest to learn Swift better and better every day I have decided that I want to write about it. My son has recently been born so I am very busy at home too which means that I don’t have much time to write. So the weekly nature of Swift Weekly is perfect for me. Also, I believe in giving to the community so that is the third reason.
Swift Weekly issue 01 focuses on the niche subject of pointers in Swift. Swift Weekly is all hosted on GitHub and you can find it here:
Have a read through the first issue and see what you think. Ideas and suggestions are welcome. Also spread the word and share this with your Swift lover friends!
Follow these steps:
That was it really. Good luck everyone. If you have any questions, just let me know.
I have now updated all example codes of O’Reilly’s iOS 8 Swift Programming Cookbook to be compatible with Xcode 6.1, Beta 2 and iOS 8.1. You can access all the sample codes on Github.
You can also get the video version of the book here.
Hi lovely readers š
My iOS 8 book is out and it is ALLLLL new, rewritten to use Swift with tons of new stuff in it.
Check it out, it is 50% off. Click here to go to O’Reilly’s website to purchase the book.
Also a surprise, I have also done a video course to teach you all about iOS 8 programming with Swift. THAT too is 50% off for a limited time. You can click here to get the videos.
Happy coding everyone
Edit 1 (20th October 2014): Apple has now fixed this issue. To convert an unmanaged object to managed, just use theĀ takeUnretainedValue() or the takeRetainedValue() method on it, based on whether you want to take a retained or unretained value.
So let’s say you have an Unmanaged<AnyObject> value that you know internally contains a value of type CFStringRef and you want to convert this to a value of type String in Swift. This is how I have managed to do that:
func convertCfTypeToString(cfValue: Unmanaged!) -> String?{
/* Coded by Vandad Nahavandipoor */
let value = Unmanaged.fromOpaque(
cfValue.toOpaque()).takeUnretainedValue() as CFStringRef
if CFGetTypeID(value) == CFStringGetTypeID(){
return value as String
} else {
return nil
}
}
Shown in Xcode it looks like this:
A while ago I wrote on my blog about a solution to one of the most common questions asked by Objective-C programmers which is “How can I create string enumerations?”. Well, the solution that I’ve given has immediately become one of the top subjects that attracts developers to my blog, as I can see in my stats. I thought I should now take it to a whole other level and get rid of the limitations that I had presented in the old solution, and come up with a fresh perspective.
The following video is the result of my work on this subject. I hope you’ll enjoy watching it.
Hello internet. After writing many many books and developing iOS apps for 6+ years, I feel I am now ready to take on a new challenge. To start teaching iOS development to people who are interested in transforming or perfecting their career.
I am available for teaching iOS development to you ANYWHERE in the world you are in. If you are in London or in Brighton in the UK, we can have face to face lessons. If anywhere else in the world, I can teach you over Skype.
Classes will be tailor made to suite your free times, abilities, etc. If you are interested, get in touch by sending me an email at: vandad.np@gmail.com
In this video, I’ll demonstrate to you some of the baiscs of LLDB using the “expr” command to speed up your day to day development.