last day (15 days later) » 

5:04 PM
Hi Shubhank, Thanks for trying to help me.
If it helps here is my code again
import UIKit

@IBDesignable
class AdventDoor: UIView
{
@IBInspectable var shapeColor:UIColor = UIColor.blackColor()
var width:CGFloat?
var shouldBeHidden:Bool = false



required init(coder aDecoder: NSCoder) {
//Initilse UIView
super.init(coder: aDecoder)!
//Create UILabel
let dateLabel:UILabel = UILabel(frame: CGRect(x: (bounds.width-25)-5, y: 3, width: 25, height: 20))
dateLabel.textAlignment = NSTextAlignment.Right
dateLabel.text = self.restorationIdentifier!
//Show the UILabel
self.addSubview(dateLabel)
 
okay.
 
How would I make the fill colour slide like closing doors?
 
so lets divide it into tasks. what are your requirements
 
I would like to make the fill colour of the square slide like closing doors as shown in my question.
 
okay you want to do animation right.
 
5:07 PM
I have been able to hide the text (the UILable subview)
Yes
 
ever done one with core graphics /
?
 
This is my first time with Core Graphics. Doing this application to learn it.
 
okay, so i would suggest you to read some posts on CAAnimations.
that is the framework which does the animations on the layers
rather then the UIViews
 
I am also fairly new to swift, however I have used other languages so I can easily understand Swift code
Do you mean CGAnimations?
 
you are handling the path using core graphic so you will be animation the fill layer from one fill point to other
 
5:08 PM
Ok.
 
i believe it is CAAnimations only
 
Ok, wasn't sure if the CA was meant to be CG. So is it Core Animations working with Core Graphics then?
 
yes
 
Ok.
Anything that you could tell me to help me with this?
 
so you have no experience with Objective C ?
 
5:10 PM
No
 
okay
i would suggest first reading some core animations swift posts.
 
I am fairly new to swift too. I have done Python and a bit of C++ as well as AppleScript. I may not know how to code in swift but I can understand what is happening when I see the code.
 
once you will get the idea i can help in porting. porting requires more presence of mind then knowledge of the language imo, i am sure we can do it easily by some trial and error.
 
Ok. Any good YouTube videos you know about? (I learn better watching videos)
Ok.
 
haha, i have always followed blogs and some WWDC vids.
no worries, you will definitely find something i am sure.
so your tasks should be :
1) Understanding core animation by doing 1-2 example.
2) Trying to then understand objective c code, which i can help in.
3) porting it to swift.
 
5:13 PM
Its because I find it harder looking at documentation. Do you have any tips on reading documentation? Also with documentation, I can't always be bothered to read it. :)
Thanks.
 
yes, true.
dont always go with the documentation. understanding where you can get the most help is also a process to solve things.
 
Also with code snippets, I tend to copy and paste them. :)
 
sometimes stack works, some time docs.
 
Ok.
 
haha, dont do that.
in the beginning phase of a language, you shouldnt be copy pasting.
most of your time will be spent debugging :/
 
5:16 PM
I know. I do tinker around with it though sometimes.
Yea. :(
 
there are a few iOS dev rooms on stack.
you can visit them for help.
 
Ok. Thanks
 
just dont be a help vampire :p
 
:)
Couldn't find any CA videos using swift quickly, is this a good tutorial? I find 'Hacking With Swift' useful some times. I will just try not to copy and paste. :) raywenderlich.com/113686/…
Want hacking with swift, that site I also find helpful some times,
 
that seems to be a specifici library tutorial
wouldn't suggest that.
 
5:22 PM
Why? To do with Core Animation isn't it?
 
it does not teach Core Animation, it shows how to do things with a wrapper
wrapper saves time.
but it requires you to know the original thing first itself.
 
Ah, I see. Didn't check that quickly
 
since it is becoming more of a general chat, would you mind coming to that room. :)
 
Ok.
Just thought though that it would be better here so we don't have too many people talking at once,
 
that room is dead at night, my time :D
 
5:26 PM
Ah, ok. Just wait out though. What CA tutorials would you suggest for me? I don't mind written ones if its better.
 
yup
give me a few min to go through some
 
Ok.
Thanks for your help and patience.
 
no problem.
this is one of the top blogs.
 
Thats Objective-C though.
 
oh sorry. i saw some.property = value and thought swift.
okay so something equivalent.
that stuff was gold though. very deep and wonderful examples
 
5:33 PM
Thats ok. May look at it as well though.
 
yup , its fine.
nothing much explained but if it runs, you can tinker with it
which is what is needed
 
Thats what I do when learning. I tinker about with it so I can see what it does
Do you mind staying here while I look at the tutorial incase I need your help?
 
yup, will be here
 
Thanks.
Use of unresolved identifier - Colors @ CGContextSetStrokeColorWithColor(context, Colors.primaryColor().CGColor)
Whats causing the error here?
 
you can use UIColor.redColor().CGColor
 
5:40 PM
Thanks. What happened to Colors.primaryColor()?
Also I got the same error but for this code: kCGPathStroke
 
it should be some helper stuff the blog poster might have.
 
Why can't kCGPathStroke be found? Was it changed since Swift 1?
Ah, ook. Thanks
ok*
 
i dont know, try looking around that in the docs.
 
Filed it by changing it to .Stroke
That code is buggy.
 
whats happening
come in that room now :D
i have to keep two watch :p
 
5:47 PM
I left the room so I lost the link.
 
6:22 PM
yes
say ?
 
Just incase any of us need to go, would you like to share email addresses? If you like you can set up a email alias using iCloud like I have so you don't give your real address away, you can also delete it afterwards.
 
i hang around the chat quite often.
is it a urgent requirement ?
 
No.
 
i mean the sliding door animation
then try coming in that room tommorrow
i will have the anim ready
 
Not really. Would be nice to have sooner. Think you can tell why by the type of application. :)
Thanks.
 
6:25 PM
yup. can be done sooner but am also side by side with a client
so you might have to wait.
 
Ok. So are you self employed or do you have a job with a company?
 
kind of in a middle phase
 
If you don't mind me asking
 
handling a team for a company
part time/ contract work
 
Ok.
When do you think my code will be ready? I understand that you have a client so it doesn't matter if I have to wait until the weekend.
 
6:30 PM
please wait 10 min for an update
 
Ok.
 
i forgot about cocoacontrols
do you know about that site ?]
 
No.
Is that a tutorial site?
 
no, hundreds of code libs for you to play around
check it out.
a must for a iOS dev
searching for animation will point you to many many results
 
Ok. Thanks.
 
6:56 PM
did you went through it ?
 
The site? A little bit. Just saw what it had quickly
 
okay
wait 5 min
i am completing it
 
What, the code? Ok. Thanks.
Thought you said compiling first of all. :)
 
means ?
 
That you was compiling the project.
 
7:10 PM
i am actually using this to come up with the animation
 
Good find!
 
did you downloaded that project ?
i did the fill path animation
just adding the stroke
 
Not yet. Just watching a video then I will.
 
ok. download it, i will then tell the code to do the fill animation
 
Downloaded. Got to go soon though.
 
7:23 PM
ok, open the pathVC
 
Will you be in this room or the other tomorrow? If so what time (GMT)>
?*
 
yup, just do the path part and we will discuss about it.
did yo opened the VC ?
 
Got to go. Bye
 
haha ok
 
8:09 PM
back but on iPhond so I can't use Xcode
 

  last day (15 days later) »