These are chat archives for devslopes/swiftios9

17th
Nov 2015
MrGobert
@MrGobert
Nov 17 2015 00:10
For GigaPet exercise: I created a function to call when I restart game. Can't remember how to reanimate Monster. Using MonsterImg class not sure what parameter I need to get animation to restart.
func gameRestart() {
    penalties = 0
    penalty1Img.alpha = DIM_ALPHA
    penalty2Img.alpha = DIM_ALPHA
    penalty3Img.alpha = DIM_ALPHA

    startTimer()
    MonsterImg.playIdleAnimation()

}
To be clear. Not sure what parameter goes after MonsterImg.playIdleAnimation(....)
Sketchy Swift
@HardcoreIOS
Nov 17 2015 00:14
nothing i suppose
@MrGobert ^
MrGobert
@MrGobert
Nov 17 2015 00:15
Xcode doesn't like that
its asking for 'self' parameter with auto-complete. Assumed it would be 'self.startAnimating' but it doesn't like that either
Felix Barros
@BluePhoenix
Nov 17 2015 00:35
Do you get any more info about that function if you hold down Option and click on playIdleAnimation ?
MrGobert
@MrGobert
Nov 17 2015 00:38
Nope. Just says that it comes from MonsterImg class
MrGobert
@MrGobert
Nov 17 2015 00:44
figured it out. I had 'MonsterImg' set as the Class when I should've been calling the var
Sketchy Swift
@HardcoreIOS
Nov 17 2015 00:48
@spentak How do I create a repository using the github application?
???
github.png
Mark Price
@spentak
Nov 17 2015 00:48
cant say. i dont use that
Sketchy Swift
@HardcoreIOS
Nov 17 2015 00:49
WHY?
I am having some trouble using the terminal
Mark Price
@spentak
Nov 17 2015 00:49
everything good takes practice!
i dont use GUI version control because it is often slow
Sketchy Swift
@HardcoreIOS
Nov 17 2015 00:50
after I did git push origin master and I was done. It did nothing!
:pensive:
Mark Price
@spentak
Nov 17 2015 00:50
the main page has an overview: https://desktop.github.com/
Mark Price
@spentak
Nov 17 2015 00:57
@jackd942 your code is fairly flawless in that weather app :)
Jack Davis
@jackd942
Nov 17 2015 01:29
Thank you. I had a good teacher:)
Mark Price
@spentak
Nov 17 2015 02:03
Congrats to @jackd942 for building an awesome solution to the weather app exercise. The solution can be found in Lecture 105
tyPi70R.png
Jesus Lopez De Nava
@lodena
Nov 17 2015 02:07
Well done @jackd942 !
Mark Price
@spentak
Nov 17 2015 02:12
@/all I only need 9 more reviews for this course to take the #2 spot on Udemy for iOS 9 & Swift. If you haven't reviewed the course yet, now would be a great time to help me out!
Sketchy Swift
@HardcoreIOS
Nov 17 2015 02:12
Come on, whoever hasn’t given a 5 star review, give it now!
@/all
@spentak who is number 1? Jason rybka?
Jack Davis
@jackd942
Nov 17 2015 02:16
Yes, please leave those reviews if you haven’t. Let’s show @spentak some appreciation!
Jesus Lopez De Nava
@lodena
Nov 17 2015 02:22
Just take 5 minutes of your time and do it!
Kyle Lee
@Kilo-Loco
Nov 17 2015 02:23
@spentak I wish I could give you another review but I already gave 5 stars on both. You should make it like a raffle for the 9th or 10th person to review and buy them a hat or something from your store...
Sketchy Swift
@HardcoreIOS
Nov 17 2015 02:29
I’ll take a hat for free. lol ;)
@spentak I figured out the easiest way how to upload a git repository without needing the terminal or the gihub application. This is the easiest solution I have ever found!https://www.youtube.com/watch?v=iZws6UOaMXo
You don’t need to install git which is in the beginning!
I just uploaded the MyHood App https://github.com/HardcoreIOS/MyHood
Jesus Lopez De Nava
@lodena
Nov 17 2015 04:22
Hello @/all, sorry if this is a simple question but I'm new to OOP and swift:
On lesson 47 I created a GameClass to manage the game state as per the exercise's instructions, but now I need to access the ViewController's @IBOutlets from within the GameClass to manipulate them. Could someone point me to the right direction as to how can I do this? what do I need to do to reference these outlets from outside the ViewController? Thank you all!
Mhofu
@Mhofu
Nov 17 2015 04:35
This message was deleted
Please help. On Lecture 116: App: Showcase Part 11. My images are not displaying after I run the app. The Posts in Firebase has the ImageUrl for the image "https://image.freepik.com/free-vector/mountain-silhouettes_23-2147513405.jpg". The likes and description display fine on the App. The request for the get post imageUrl looks fine or no errors at least.
Mark Price
@spentak
Nov 17 2015 04:52
it could be many things. hard to say. What is your console printing?
Jesus Lopez De Nava
@lodena
Nov 17 2015 04:55
@spentak, could you give me an idea as to how to proceed? (see above). Thanks!
Mark Price
@spentak
Nov 17 2015 04:56
@lodena what IBOutlets are you trying to access and why
Jesus Lopez De Nava
@lodena
Nov 17 2015 04:57
Let's say I need to hide some screen elements, or update the game label that tells the HP, etc.
@spentak
Mark Price
@spentak
Nov 17 2015 05:08
One way to do this is you could post a notification from your game manager ie NSNotificationCenter.defaultCenter().postNotification...etc
then listen for that in the view controller class and adjust UI accordingly
Jesus Lopez De Nava
@lodena
Nov 17 2015 05:12
The reason I was thinking on doing this is because I thought you wanted us to move ALL code from the view controller into the game class, maybe I misunderstood. Is it ok to leave some functions/code in the view controller? I'm a newbie and don't want to complicate things a lot. You said that view controllers should only be used to direct traffic, so I assumed I needed to move all coding to another class???
Mark Price
@spentak
Nov 17 2015 05:14
Well depends on how pure you want it to be. A perfectly extracted game manager could use notifications or the delegate pattern to update the UI in the view controller. In a perfect world. Might be a little complex for someone just learning. Extract what you can into a game manager class, and leave the other stuff in the VC as needed
sometimes its a battle to decide where to put things. especially when there are multiple options
so dont overthink it
just solve the problem at hand as quickly as possible, then refactor as needed
Jesus Lopez De Nava
@lodena
Nov 17 2015 05:16
ok thanks a lot for the advice!!!
Mhofu
@Mhofu
Nov 17 2015 05:32
@spentak Besides the post, ImageUrl, description & likes. It’s printing this message Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Mark Price
@spentak
Nov 17 2015 05:34
hmm. i suggest that you do some debugging in your custom cell class where you are setting the image. Check which if lets you make it into and which you do not
it will help you track at which point the image is failing to be set
Delonn
@betaSavvy
Nov 17 2015 05:38
@spentak just left my reviews on the course! sorry it took awhile haha
Mark Price
@spentak
Nov 17 2015 05:40
Thanks @betaSavvy great review!! I appreciate it
Delonn
@betaSavvy
Nov 17 2015 05:41
haha you taught us well, this is just an honest review!
itsalexbrown
@itsalexbrown
Nov 17 2015 06:05
Hey @spentak any idea what I can look in to to validate/format(?) text input for a date? E.g automatically inserting "/" when typing a date
Mark Price
@spentak
Nov 17 2015 06:12
No magic there. Manual coding ahead of you or find a cocoapod. Listen for keystrokes then insert characters whre necessary
textFieldDidChange
textFieldShouldReturn
itsalexbrown
@itsalexbrown
Nov 17 2015 06:14
Ok cool, was thinking of trying manual so will give it a g.
go, cheers :)
CBusMB
@CBusMB
Nov 17 2015 16:52
Hi all. Is anyone else having trouble getting the Firebase framework added to their app? I have tried using Cocoapods and doing it manually. Either way, I can't build the app once I add the Firebase framework. It either tells me that something is wrong with the architecture or it says it can't find the framework all together. I've been all through Stack Overflow and google, no luck yet.
Fabian
@claudiodvlpr
Nov 17 2015 16:58
Hey guys. Just signed up for the course. Looks amazing. Im a web developer looking to get mobile. Got a brand new mac and this course to start. Already feel way more profesional with the chat, github and other resources.
Sketchy Swift
@HardcoreIOS
Nov 17 2015 16:59
@claudiodvlpr Welcome
You will love the course. Its amazing :+1:
@claudiodvlpr ^
Logan Arnett
@LoganArnett
Nov 17 2015 17:04
Question about the audio for the retro calculator
Mark Price
@spentak
Nov 17 2015 17:04
@CBusMB
1) Add the Firebase cocoapod to your Podfile
2) Close Xcode
3) In the terminal in the directory where your Podfile is run pod install
4) Open the new workspace icon instead of the blue one (the white icon)
5) it should work
@claudiodvlpr welcome!
Logan Arnett
@LoganArnett
Nov 17 2015 17:07
getting an error while loading in the audio file not sure why
Mark Price
@spentak
Nov 17 2015 17:07
@LoganArnett whenever you have an error/issue be sure to post associated code here so I we can better help
you can drag and drop screenshots here too
Logan Arnett
@LoganArnett
Nov 17 2015 17:07
yep im grabbing it now
this is my view controller
import UIKit
import AVFoundation

class ViewController: UIViewController {

    @IBOutlet weak var calcLabel: UILabel!

    var btnSound: AVAudioPlayer!

    override func viewDidLoad() {
        super.viewDidLoad()

        let path = NSBundle.mainBundle().pathForResource("btn", ofType: "wav")

        let soundUrl = NSURL(fileURLWithPath: path!)

        do {
            try btnSound = AVAudioPlayer(contentsOfURL: soundUrl)
            btnSound.prepareToPlay()
        } catch let err as NSError {
            print(err.debugDescription)
        }

    }

    @IBAction func numberPress(btn: UIButton!) {
        btnSound.play()
    }


}
Mark Price
@spentak
Nov 17 2015 17:09
what line is it crashing on
Logan Arnett
@LoganArnett
Nov 17 2015 17:09
on the let path =
Mark Price
@spentak
Nov 17 2015 17:10
what is the error. not sure why it would crash there
Logan Arnett
@LoganArnett
Nov 17 2015 17:10
Thread 1: breakpoint 1.1
Mark Price
@spentak
Nov 17 2015 17:10
hmm looks like you dont have an error, but a breakpoint
maybe you accidentally clicked the left side and added a blue breakpoint
Sketchy Swift
@HardcoreIOS
Nov 17 2015 17:10
Could you post a screenshot of your code
CBusMB
@CBusMB
Nov 17 2015 17:10
This message was deleted
Sketchy Swift
@HardcoreIOS
Nov 17 2015 17:10
@LoganArnett
A screenshot of the crash
Logan Arnett
@LoganArnett
Nov 17 2015 17:11
blob
Mark Price
@spentak
Nov 17 2015 17:11
yeah thats not a crash
drag those blue tags off of the left
those are for debugging, your program stops execution so you can examine application state/data at that point in time
Logan Arnett
@LoganArnett
Nov 17 2015 17:12
are those debuggers
gotcha
interesting i dont know how those got on there haha
thanks for the help
Mark Price
@spentak
Nov 17 2015 17:13
i do that all the time
CBusMB
@CBusMB
Nov 17 2015 17:13
@spentak Thanks for the reply. I have tried that many times, also followed leads from stack overflow and google regarding bulid phases, etc... Also restored project from back up, deleted pods folder, pod file, then reinstalled. Still no luck.
Logan Arnett
@LoganArnett
Nov 17 2015 17:13
love the course so far, im a web developer interested in getting into some mobile as well
Mark Price
@spentak
Nov 17 2015 17:13
accidentally add them
@CBusMB show me your very specific error
CBusMB
@CBusMB
Nov 17 2015 17:14
at office now, don't have access to personal projects. Will try later. thank you.
Sketchy Swift
@HardcoreIOS
Nov 17 2015 17:17
@LoganArnett You can download the full Xcode version from the app store. Xcode 7
Logan Arnett
@LoganArnett
Nov 17 2015 17:31
yea im on Xcode7.1.1
Sketchy Swift
@HardcoreIOS
Nov 17 2015 17:39
oh, ok. Looked like beta
rodrynet
@rodrynet
Nov 17 2015 17:48
Hi guys! :) Hello form Spain! :+1:
Jack Davis
@jackd942
Nov 17 2015 17:48
Hi @rodrynet
Mark Price
@spentak
Nov 17 2015 17:48
@rodrynet Hola!
Jack Davis
@jackd942
Nov 17 2015 17:48
welcome
rodrynet
@rodrynet
Nov 17 2015 17:49
@spentak Thank You for your course :) it was really fun develop :)
Sketchy Swift
@HardcoreIOS
Nov 17 2015 17:50
@rodrynet Hola
rodrynet
@rodrynet
Nov 17 2015 17:58
guys! i need some help! i currently developing an app and i want to do something but i don't know how... :worried: can you help me? I have 2 viewcontrollers, the main view controller and the secondviewcontroller, this secondviewcontroller it will appear when you push a button. For now it´s ok. The "BIG" thing is... in the second viewcontroller i want to update a number who is the mainViewController when i close the secondviewcontroller... any ideas? Thank You all! :) (Sorry for my bad english LoL)
Sketchy Swift
@HardcoreIOS
Nov 17 2015 17:59
Can you post some screenshots?
rodrynet
@rodrynet
Nov 17 2015 18:08
Captura de pantalla 2015-11-17 a las 19.07.42.png
elitelady
@elitelady
Nov 17 2015 18:26
Hello everyone! It's my first day taking this course and I'm super excited. Am I able to use X Code 7.2 for this course?
Sketchy Swift
@HardcoreIOS
Nov 17 2015 19:01
@elitelady Welcome
Yes
elitelady
@elitelady
Nov 17 2015 20:22
@HardcoreIOS thanks!
Hannes
@hons82
Nov 17 2015 20:49
@rodrynet If i understand it right, then you have two possibilities.
Hannes
@hons82
Nov 17 2015 20:55
okay, there is a third possibility, if you would send a reference of the mainviewcontroller to the second... But you shouldn't do that
andrew-buksha
@andrew-buksha
Nov 17 2015 21:08

Hi everyone. I just finished my weather app, and when I was going to make a screenshot and post it on student showcase, it gave me an error:

ld: file too small (length=0) file '/Users/bmecrunk/Library/Developer/Xcode/DerivedData/LocalWeather-fbizxzbxcmvgdbfvngzpnnymelas/Build/Intermediates/LocalWeather.build/Debug-iphonesimulator/LocalWeather.build/Objects-normal/x86_64/Weather.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Anyone have any idea?
It compiled moment ago, and I didn't change anything since then.

rodrynet
@rodrynet
Nov 17 2015 22:17
Thank you @hons82 let me check that :smile:
Tim McEwan
@timmyqtpie
Nov 17 2015 23:23
Hello all I'm new here hope to help you guys out and hopefully you can help me.
Sketchy Swift
@HardcoreIOS
Nov 17 2015 23:40
@timmyqtpie Hello
welcome