Ray Wenderlich Course Part 6 (up to lesson 53)
Well this course has been really positive so far. There are a few bits and pieces I don't fully agree with - mostly the use of typing out the code for buttons/labels but there have been plenty of successes and opportunities to demonstrate what I know.
Styling with Images and Labels
1x, 2x and 3x - I know this from before.
I've inserted all the images to the assets, then put in the image view with the background, changed the size. All good!
I have customised various buttons using Ray's resources and directions. Shame that I can't screenshot it - looks good!
Styling with Images and Labels
1x, 2x and 3x - I know this from before.
I've inserted all the images to the assets, then put in the image view with the background, changed the size. All good!
I have customised various buttons using Ray's resources and directions. Shame that I can't screenshot it - looks good!
let thumbImageNormal = UIImage(named: "SliderThumb-Normal")
slider.setThumbImage(thumbImageNormal, for: .normal)
let thumbImageHighlighted = UIImage(named: "SliderThumb-Highlighted")
slider.setThumbImage(thumbImageHighlighted, for: .normal)
let insets = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14)
let trackImageLeft = UIImage(named: "SlideTrackerLeft")
let trackLeftResizable = trackImageLeft?.resizableImage(withCapInsets: insets)
slider.setMinimumTrackImage(trackLeftResizable, for: .normal)
let trackImageRight = UIImage(named: "SlideTrackerRight")
let trackRightResizable = trackImageRight?.resizableImage(withCapInsets: insets)
slider.setMaximumTrackImage(trackRightResizable, for: .normal)
This is all pretty confusing! Again, a lot of code just thrown out there which Ray can't explain as it is too technical.
Ray has reminded me that you can select the image rather than typing out the string - I did this before with Angela's Dicee app!
Using those are IMAGE LITERALS. The optionals are now not needed.
et thumbImageHighlighted = imageLiteral(resourceName: "SliderThumb-Highlighted")//UIImage(named: "SliderThumb-Highlighted")
slider.setThumbImage(thumbImageHighlighted, for: .normal)
I've now edited the buttons and text for the other two screens - that was the challenge! Also, I've used 'splicing' horizontally for the stretched buttons.
All of this has been really useful and it's the first app that looks different from the usual Apple view. All of the different buttons, sliders etc. have really helped with this!
Web Views
So this is pretty cool - you can insert a web site into the storyboard.
*OK executive decision - I am NOT going to waste any time with this! There are so many errors and the solutions offered look like they are going to take some time. So, no offence Ray, but I am skipping the whole Web Views aspect for now!
Auto Layout
I know ALL about this! I remember quite a lot from Angela/Pasan so should be OK....
Embed in view - cool! You can select all the labels, buttons etc and embed in view. This will keep everything in line with one another. Cool!
Challenge - Auto Layout for Other Storyboards
Yes this was fine. I'm never TOTALLY sure about AL - about which constraints have what effect. I get the basics and am fine when everything is being pinned around the outside e.g. the background, but for other labels and buttons it is not so easy.
Update frames - if the button is moved around, the update frames will put it back where AL has coded it to be. Useful!
Fantastic - all working and on the phone itself! The only thing I wanted to do was to get a max of 5 rounds. That would be cool but I tried it and it was so difficult with the instance and local variable set up. I will try that again before moving onto the next part, which is more about the programming language. I may will skim through some of that. Anyway, first app with Ray complete and it is admittedly the best one I've done so far!
Comments
Post a Comment