These are chat archives for devslopes/swiftios9

11th
Nov 2015
jas0nlhy
@jas0nlhy
Nov 11 2015 00:02
@spentak I am at exercise (Favorite place app). If I have a tonne of contents that wont fit into the View Controller, requiring the user to scroll down for more contents (texts and images), is there a way to do it? I googled and found that is has got something to do with UI Scroll View but cant seem to find the right one.
Mark Price
@spentak
Nov 11 2015 00:39
Watch my video on UIScrollView
Auly123
@Auly123
Nov 11 2015 02:33
This message was deleted
Sketchy Swift
@HardcoreIOS
Nov 11 2015 04:00
This message was deleted
Volkan Gürol
@volkangurol
Nov 11 2015 07:20
@spentak thank you i received the email.
Jack Davis
@jackd942
Nov 11 2015 17:33
Screen Shot 2015-11-11 at 11.30.46 AM.png
CocoaPods are the bomb…Had an idea for an app for awhile that will involve a calendar…Searched for a pod and found CVCalendar..
Mark Price
@spentak
Nov 11 2015 17:33
Nice! Especially with Calendars - SOOO much work goes into calendars/dates
Jack Davis
@jackd942
Nov 11 2015 17:34
Yeah…and this was very easy to implement with about 15 minutes of work
I remember the nightmares from C# .Net and Windows Mobile 5 a few years back
Mark Price
@spentak
Nov 11 2015 17:35
yeah with Cocoapods, Github, and iOS its easy to find a lot of great pieces quickly to build an app very fast
Jack Davis
@jackd942
Nov 11 2015 17:36
You look like you might lift @spentak …this is going to be for a 5/3/1 training app one day:)
Mark Price
@spentak
Nov 11 2015 17:37
haha yeah i'm a big lifter. Though - producing these two courses drained my life and i'm getting fat now :p
will definitely buy your app :)
Jack Davis
@jackd942
Nov 11 2015 17:37
we’ll see how it goes...
AxlFlame
@AxlFlame
Nov 11 2015 18:47

@spentak, sorry to ask this again, but could you point me to a tutorial or any tips on how can I add UILabels programmatically in a table cell and expand its height accordingly?

I tried 'let lbl = UILabel(frame: CGRectMake(0, 0, 200, 21))
lbl.center = CGPointMake(160, 284)
lbl.textAlignment = NSTextAlignment.Center
lbl.text = voo.Numero
self.addSubview(lbl)'

The project builds, but this new label is not shown.
Paul Van Wieren
@paulvanwieren
Nov 11 2015 19:38
@TarekSalama @spentak another way to do this is to just put your two buttons (no constraints) into a stack view, then set the stack view alignment to fill, distribution to fill equally, and spacing to whatever value you want (say 20). Then, just set constraints on your stack view and the buttons will grow/shrink equally with it.
Mark Price
@spentak
Nov 11 2015 19:39
@paulvanwieren very great suggestion
i forgot we had stack views!!
That is the better suggestion if you are willing to support iOS9+
Jack Davis
@jackd942
Nov 11 2015 19:44
haha
I have a love/hate relationship with stack views
Mark Price
@spentak
Nov 11 2015 19:58
hahaha
well if you have a hate relationship it is because you haven't worked long enough with Auto Layout where we didn't have them
Jack Davis
@jackd942
Nov 11 2015 20:03
that’s true
need to wrap my head around them a little better…right now there seems to be too much “magic"
Jack Davis
@jackd942
Nov 11 2015 20:08
@spentak I see that you’ve got comprehensive core data in the intermediate outline. Will it include something like local disconnected storage with remote db sync when the network is available?
Mark Price
@spentak
Nov 11 2015 20:09
@jackd942 that feature you are mentioning is incredibly complex - one could spend 100k building such a solution. Won't be covering that
I would use Firebase or Parse, or not allow syncing with the server before I built such a feature. would be a last resort
Jack Davis
@jackd942
Nov 11 2015 20:10
10-4
Mark Price
@spentak
Nov 11 2015 20:11
You have to store that offline data and check if it has been uploaded. If not then you attempt to post to the server. If data has dependencies on other data then you have to sync that too. Then what happens if any bit of the syncing fails. or what happens if an android device already posted the data and your data on iOS is now out of date
Then of course you have to handle PUT vs POST
and DELETE
Jack Davis
@jackd942
Nov 11 2015 20:12
I guess that’s one advantage for .NET…sync framework:)
Mark Price
@spentak
Nov 11 2015 20:13
99% of iOS apps just don't allow posting/updating of data when there is no network. basically you can't use that feature in the app until you have network
Jack Davis
@jackd942
Nov 11 2015 20:13
not nearly painless, but there is a framework in place for it
Mark Price
@spentak
Nov 11 2015 20:14
Parse has a good sync engine
Jack Davis
@jackd942
Nov 11 2015 20:18
I’ll have to check it out
Mark Price
@spentak
Nov 11 2015 20:18
but it makes you dependent on their backend
Jack Davis
@jackd942
Nov 11 2015 20:19
yeah…I’m probably getting ahead of myself on some ideas I have. I’ll have to figure it out down the road
Mark Price
@spentak
Nov 11 2015 20:19
haha usually its not worth it to support it. when people don't have internet they don't really care to use an app, or the internet comes right back up
Jack Davis
@jackd942
Nov 11 2015 20:21
true