Hey guys. I am trying to get the url out of an image selected from an imagePicker in swiftui (target: iPhone). Any ideas on how to do this?
Post
Replies
Boosts
Views
Activity
Hey guys. I have the error: "Binary operator '<' cannot be applied to two 'Date?' operands" popping up after changing this:
class TaskItem: Object, Identifiable {
@Persisted(primaryKey: true) var id: ObjectId
@Persisted var taskTitle: String
@Persisted var taskNotes: String
@Persisted var taskDate: Date = Date()
@Persisted var isFinished: Bool
@Persisted var taskTime: Date = Date()
@Persisted var isNotificationsEnabled: Bool
@Persisted var taskColor: String
static func < (lhs: TaskItem, rhs: TaskItem) -> Bool {
if lhs.taskDate == rhs.taskDate {
return lhs.taskTitle < rhs.taskTitle
} else {
return lhs.taskDate < rhs.taskDate
}
}
}
to:
class TaskItem: Object, Identifiable {
@Persisted(primaryKey: true) var id: ObjectId
@Persisted var taskTitle: String
@Persisted var taskNotes: String
@Persisted var taskDate: Date? = nil
@Persisted var isFinished: Bool
@Persisted var taskTime: Date? = nil
@Persisted var isNotificationsEnabled: Bool
@Persisted var taskColor: String
static func < (lhs: TaskItem, rhs: TaskItem) -> Bool {
if lhs.taskDate == rhs.taskDate {
return lhs.taskTitle < rhs.taskTitle
} else {
return lhs.taskDate < rhs.taskDate
}
}
}
Please help as fast as possible, since there is almost no more time left for the swift student challenge.
Hey guys,
I was using a ForEach loop and everything was fine. But when I implement NavigationLink, the background of each item turned gray. Any ideas on how to remove the background?
Please answer as fast as possible.
Much appreciated,
mrhn_huor
Hey guys. I'm working on an app for the Swift Student Challenge and I found a problem. Each time I try to change the color of a whole list, nothing happens. For example, I tried to use .background(Color.black), but the list stayed gray.
Please help as fast as you can.
Much appreciated,
mrhn_huor