Stack Exchange
log in
users (9)
rooms (12)
faq
Wez
general
recent
conversations
[iOS][Android][ChaosOverFlow]
Join to become part of the community, not to simply ask questi...
Wez
Apr 28, 2020 08:56
Long time no see
Wez
Jan 15, 2019 10:41
I don't know Android sorry.
Wez
Jan 15, 2019 09:05
Morning!
Wez
Jan 14, 2019 13:13
Wez
Jan 14, 2019 12:23
codeable is v. helpful, and trying to keep your models clean and generic will help.
Wez
Jan 14, 2019 12:23
thank me later :P
Wez
Jan 14, 2019 12:13
lots of answers for this stuff on stackoverflow too :)
Wez
Jan 14, 2019 12:12
medium.com/@andrea.prearo/…
Wez
Jan 14, 2019 12:12
If you are doing anything with APIs and JSON i'd also look at Codeable -
developer.apple.com/documentation/swift/codable
Wez
Jan 14, 2019 12:11
first google search result i found:
medium.com/xcblog/…
Wez
Jan 14, 2019 12:11
theres plenty out there, I actually use sqlite in my project so I can't guide you myself
Wez
Jan 14, 2019 12:09
It's definitely possible to store custom objects in coredata
Wez
Jan 14, 2019 11:32
yo yo yo
Wez
Jan 14, 2019 11:05
@Shubhank whats your plan?
Wez
Jan 14, 2019 10:45
keeping this logic out of the app is best i think
Wez
Jan 14, 2019 10:39
well the API does most of the work, if we get a 401 'Unauthorized' back from the api when making a request we log the user out of the app.
Wez
Jan 14, 2019 10:38
sort of yes
Wez
Jan 14, 2019 10:02
hello!
Wez
Jan 14, 2019 09:38
oh hey
Wez
Jan 11, 2019 14:32
So what happened to the chat bot?
Wez
Jan 11, 2019 13:52
xD
Wez
Jan 11, 2019 12:43
@Shubhank when do you get any work done? :P
Wez
Jan 11, 2019 11:34
Wez
Jan 11, 2019 09:40
Morning
Wez
Jan 10, 2019 16:46
nice :D
Wez
Jan 10, 2019 16:46
No work!!
Wez
Jan 10, 2019 11:36
what are we up to today?
Wez
Jan 10, 2019 10:55
Not bad thanks
Wez
Jan 10, 2019 10:18
Goodmorning!
Wez
Jan 9, 2019 14:03
yo yo yo
Wez
Jan 8, 2019 16:10
no prob, keep up the fight bro
Wez
Jan 8, 2019 16:08
not atm anyway
Wez
Jan 8, 2019 16:08
you may have to look in to these on stack, i've suggested a solution, I am not able to test.
Wez
Jan 8, 2019 16:06
// remove if already in the selected array
if let index = selectedSpeciality.index(of:object) {
selectedSpeciality.remove(at: index)
} else {
// append if not in the selected array
selectedSpeciality.append(object)
}
Wez
Jan 8, 2019 16:06
you need to swap the array to the
selectedSpeciality
Wez
Jan 8, 2019 16:05
oh also
Wez
Jan 8, 2019 16:05
same error? or new?
Wez
Jan 8, 2019 16:05
^
Wez
Jan 8, 2019 16:05
struct SelectedSpecialization:Equatable {
Wez
Jan 8, 2019 16:04
try making your model equatable
Wez
Jan 8, 2019 16:00
i am looking
Wez
Jan 8, 2019 15:53
8-)
Wez
Jan 8, 2019 15:43
whats the error?
Wez
Jan 8, 2019 15:42
whats the issue?
Wez
Jan 8, 2019 15:37
:D
Wez
Jan 8, 2019 15:37
We can't write it all for you.
Wez
Jan 8, 2019 15:37
give it a go
Wez
Jan 8, 2019 15:37
do a little switcheroo
Wez
Jan 8, 2019 15:37
can you see what the code is doing?
Wez
Jan 8, 2019 15:37
okay, do you think you can handle it?