Skip to main content

Building my first iOS App

I have been following along with a PluralSight video by John Sonmez, to learn the basics of developing for iOS. After creating a simple "Hello World" app, he moves into creating a protein tracking app. I have recently been looking into a diet change that would see me limit the amount of carbs that I eat significantly, so I plan on taking the protein tracking idea and apply it to carb tracking. Hopefully I can create an app that will be simple to use and will help me follow my new diet. After I complete the course, and with it a starter app, I will try to add to this app and give it new features while also expanding my knowledge of iOS development.

So the first steps are to put some controls on the screen. This reminds me a lot of how Visual Studio works when in Design mode. You have a "toolbox" full of controls and you can drag and drop them onto the view. You align those controls with guidelines provided by the IDE. You can anchor a control to a part of the view or to other controls. This seems like a really nice way to get some basic functionality in the view, but I do not tend to work in Design mode in VS. I will always switch to Source mode and add my controls in code. I expect that I will be able to do that in Xcode as well, but so far I have not learned how.

Another thing that is different at first is where some of the information for a control is at. Right now I have an information center on the righthand side and the section has a lot going on. It will probably take me a while to get used to where everything is and how it is laid out, or more likely as I learn more I will probably end up reorganizing things to work better for me. This is probably something I take for granted in VS because I have worked with it for so long, and had to start over with it so many times, that I know exactly where everything should be and how to rearrange things if they are not how I like them.

Connecting a control to the code behind is also new to me. I have most of my experience with Webforms in the .NET world, and there when you add a control the plumbing to the code gets created for you. Your code then knows about that control and you can go about interacting with it however you like. In Xcode, at least what I have learned so far, you drag from the view into the H file and it creates the link between the 2. Its fairly interesting, and somewhat satisfying, how the pieces create the link, however I assume that will get old quick and I will be looking for a way to do all of that in code as well.

In VB when you want to call a control, variable, or function, you just type the name and it will then let you interact with it according to the ways that object knows how to interact. In Objective C, if you want to call a function you need to wrap it with brackets and then have the name of the function first, followed by parameters. At least that is how I think things are working right now. It is fairly different from what I am used to, but I should pick it up quick.

Another big shift from Webforms thinking is defining objects and controls in the header, H, file. Each view has a header file that defines it's interface with a class, M, file that uses that interface definition. I see this as a good thing as it will likely make reuse of that code easier and more built-in. In Webforms because you just have a Class that your controls are put onto, by default you do not think about reuse or using an interface for things that ought to be. When you start out in Webforms you just place everything in a class and don't think any beyond that class. Here you get an interface by default, and decouple your control definition from their use through that interface.

Completing the Plural Sight course has given me a very basic app that will be a good starting point for what I want to create. I still have a lot of work to do before this app is ready to be used. I look forward to continue learning iOS development and building this app.

Comments

  1. I just need to say this is a well-informed article which you have shared here about hoodies. It is an engaging and gainful article for us. Continue imparting this sort of info, Thanks to you. App Development For Business Singapore

    ReplyDelete
  2. I read your post and got it quite informative. I couldn't find any knowledge on this matter prior to. I would like to thanks for sharing this article here.Cyber Security Consultancy Service Provider site.

    ReplyDelete
  3. This post is really awesome. Genuinely i like this blog. It gives me more useful information. I hope you share lots of things with us .Reliable project management consulting firm usa site.

    ReplyDelete

Post a Comment

Popular posts from this blog

Converting a Large AngularJS Application to TypeScript Part 1

I work on a project that uses AngularJS heavily. Recently we wondered if using a preprocesser like CoffeeScript or TypeScript for our JavaScript would be beneficial. If our team is going to switch languages, we would need to be able to convert existing code over without much pain and we would have to find enough value in switching that it would be worth the conversion. I had read an article that stated that because TypeScript is a SuperSet of JavaScript, you could convert a plain JavaScript file to TypeScript by changing the extension to .ts and not much else would need to change. I wanted to test out this claim, so I took a file that I was familiar with, an Angular Controller, and tried to convert it to TypeScript to see how much effort it would take and then try to figure out where we would benefit from using TypeScript. This is what the controller JavaScript file looked like to start out with: ( function () { 'use strict' ; angular .module( 'app'

Interns: Taking off the training wheels

My intern team has been working for several weeks now on our new website. We have already completed one deployment to production and are finalizing our second one. We started with a plan to release often adding small bits of functionality as we go and so far that plan has been working really well. We already feel like we have accomplished a lot because we have completed many of our project's requirements and should easily be able to complete the rest giving us time to do even more than just the original requirements. One of the things I have had some difficulty balancing has been how much to lead the interns and how much to let them figure out on their own. In deciding what our team process should be and how we should allocate our time, I think it was important for me to do more leading. I saw some deficiencies in how we were currently working and brought up some ideas for how we could address them. We had moved into spending all our time just working through stories and did not

My idea for Hearthstone to add more deck slots

Recently someone asked the Blizzard developers for more slots for decks in the game Hearthstone. The response was that they are talking about it and looking into it, but no decision has been made yet. One of the concerns over adding deck slots is that it could complicate the UI for Hearthstone and make it more difficult for new players to understand. I have what I think would be a good solution to add more deck slots without increasing the learning curve for the game much if at all. First I would take a look at the current selection screen for starting to play a game. It defaults to showing the decks that are custom built by the player if they have any custom decks, and there is an option to page over to the basic decks. This basic deck screen is perfect for how I would change this process. Instead of having 2 pages of decks, 1 for basic and 1 for custom, you would just see the select a Hero screen. Then once you selected the Hero you wanted, you would see all of the decks that