These are chat archives for devslopes/swiftios9

31st
Oct 2015
Wayne
@Wrenbjor
Oct 31 2015 04:24
@spentak That didn't work... I added just the reload and then I also added the NSNotificationCenter and neither are working. The dismissViewControllerAnimated call is not working either... Now I did use a NavigationController because I wanted the built in back buttons and the format, not sure if that matters...
override func viewDidAppear(animated: Bool) {
        NSNotificationCenter.defaultCenter().addObserver(self, selector: "onPostsLoaded:", name: "postsLoaded", object: nil)

        tableView.reloadData()
    }
Mark Price
@spentak
Oct 31 2015 05:26
@AxlFlame to be honest stackviews take a lot of trial and error before you get them down perfectly. You can set Size Classes for different screen sizes. Check out my video on size classes
KaushikShivam
@KaushikShivam
Oct 31 2015 10:49
Hello.
Does anybody have experience in mapkit?
@spentak ?
Mark Price
@spentak
Oct 31 2015 14:55
Welcome @Wrenbjor
Yes
chaseripken
@chaseripken
Oct 31 2015 18:55
where can we find the correct code for the exercises?
@everyone
Jack Davis
@jackd942
Oct 31 2015 18:58
What do you mean “correct” code @chaseripken ? There is a resources button above the videos in Udemy or you can click the download icon in the right contents pane...
The button is entitled “View Resources”. If it is not there, then there are no downloads associated with the video. If it is a multi-part lesson, you may have to go to lesson 1 to download...
chaseripken
@chaseripken
Oct 31 2015 19:21
Thanks @jackd942
What exactly is a 'float' used for
Jack Davis
@jackd942
Oct 31 2015 19:22
Numbers that have a decimal place. Similar to a Double but a Double holds larger values…ie Double is 64 bit and Float is 32 bit
tbonesteak
@tbonesteak
Oct 31 2015 19:59
@spentak so there are 5 delegate methods you want to set up when working with UITableViews and UICollectionViews, right? cellForItemAtIndexPath, didSelectItemAtIndexPath, numberOfItemsInSection, numberOfSectionsInCollectionView
and sizeForItemAtIndexPath?
Mark Price
@spentak
Oct 31 2015 20:16
Looks about right
MrGobert
@MrGobert
Oct 31 2015 22:42
Hello. Anyone have a moment to show me how I would increase a variable connected to a button tap by the value of another variable? I'm referring to the Multiples App exercise. Got everything working but can't figure out how to increase multiplier each tap.
Jack Davis
@jackd942
Oct 31 2015 23:00
I belive, if I remember correctly, on your tapped action, you just increment your counter variable by 1…like so… currentTaps++
This message was deleted
    @IBAction func onCoinTapped(sender: UIButton!) {

        currentTaps++
        updateTapsLbl()

        if isGameOver() {
            restartGame()
        }

    }
Jack Davis
@jackd942
Oct 31 2015 23:08
Sorry @MrGobert , you asked about the Multiples app...
    // Game Screen Actions
    @IBAction func addBtnTapped(sender: UIButton!) {

        if curSum < maxSum {

            prevSum = curSum
            curSum += multiple
            resultsLbl.text = "\(prevSum) + \(multiple) = \(curSum)"

        } else {

            curSum = 0
            entryTxt.text = ""
            resultsLbl.text = "Press Add to Go"
            switchGameMode()

        }
    }
MrGobert
@MrGobert
Oct 31 2015 23:09
Yeah. That would just add 1. I need to add the variable (Int) that's assigned to the the multiplier
Jack Davis
@jackd942
Oct 31 2015 23:10
Is that the one you needed?
MrGobert
@MrGobert
Oct 31 2015 23:10
Ah. I think that may be what I was looking for. Trying not to look at the source code
I see there is a max number set and if the current sum is less than max then add multiple to current sum.
+= may be what I need to use
MrGobert
@MrGobert
Oct 31 2015 23:53
That was it! Thanks.
Jack Davis
@jackd942
Oct 31 2015 23:53
Good deal