Day 11, June 2 – Vidushi

I spent some of my time today looking up basics of Objective C. Since we seem to be rapidly approaching the conclusion that if we want a marquee label, we will have to hardcode it, I think that being able to understand existing implementations that don’t work for us would be a good idea. Most of my day was spent trying to untangle Swift and Objective C code. I continued along the same being as yesterday, taking an implementation of marquee labels in Objective C and attempting to write the same class in Swift. This took a lot of time with little to show for it. At first I thought I could simply go through the whole .m file and translate each function one by one, but many of them used classes or syntax that I am not familiar with. So I chose to only try to implement those functions which I understood, or the ones that I thought I might actually use. This resulted in a class that I cannot fully implement, and at this point this version of marquee labels isn’t functional, so I still haven’t been able to see how functional they in fact are.

To try and find alternate routes to the same end, I did a couple of things. I started just by reading the only Swift implementation of marquee labels that we have found to date. Since it is only missing one function that we want in our marquee labels, I think we can get away with just modifying this existing codebase, so I thought it would be good to become more familiar with this. I also tried to look for other implementations (in Objective C or Swift), and while I was unsuccessful, my search did yield something else useful: in a Swift project, it is possible to include Objective C files and classes. So the marquee label that I have in Objective C could just be imported over. I tried it, following the tutorial, but my Swift files don’t recognize my Objective C class. Hopefully I can make this work tomorrow.

We also successfully got some apps to run on our iPads, thanks to Prof Sweedyk. Unfortunately we only really had time to authorize one of our laptops to work with the developer account, so I don’t actually have any way of simulating apps on my laptop just yet. Hopefully we can get this to work soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s