Search results for

calendar

1,863 results found

Post

Replies

Boosts

Views

Activity

Open UIDatePicker window programmatically within iOS 14
I'm currently improving my DatePickerCell under iOS 14. The DatePickerCell exists out of a title label on the left and a text field on the right. I previously had a date picker (embedded into the inputView of the UITextField) open when you tap the cell. I now replaced the UITextField with the new UIDatePicker, where the calendar comes up in compact mode, when you tap on the label of the date picker. The part I'm missing now is to open the calendar when the whole cell is tapped. datePicker.becomeFirstResponder() is unfortunately not working :/ Any other ideas/workarounds?
1
0
1.5k
Sep ’20
Reply to earliestBeginDate timezone
[quote='779047021, VasileGreabanu, /thread/779047, /profile/VasileGreabanu'] how is the value interpreted with respect to timezone ? [/quote] It is not. It’s of type Date, and Date represents a fixed point in time. Under the covers it’s actually on offset, in seconds, from the reference date (the beginning of 2001). If you want to specify specify a local time, create a DateComponents value and pass that into Calendar to get a Date. There is one gotcha though: If the device changes time zone after when your schedule your task, there’s no easy way for you to adjust for that. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Apr ’25
How to control when a DatePicker "pops up"
I have a Date field that holds the scheduled start date for an activity.. However, activities can be unscheduled (i.e., waiting to be scheduled at some other time). I want to use Date.distantFuture to indicate that the activity is unscheduled. Therefore I am looking to implement logic in my UI that looks something like @State private var showCalendar: Bool = false if date == .distantFuture { Button(unscheduled) { showCalendar.toggle() }.buttonStyle(.bordered) } else { DatePicker(section: $date) } .popover(isPresented: $showCalendar) { } But this approach requires that I access the DataPicker's Calendar view and I don't know how to do that (and I don't ever what my users to see Dec 31, 4000). Any ideas? (BTW, I have a UIKit Calendar control I could use, but I'd prefer to use the standard control if possible.)
4
0
120
Mar ’25
Reply to @Query with Set
@Query(filter: #Predicate { $0.dates = DateComponents(calendar: Calendar.current, year: 2025, month: 3, day: 4)}, Your code snippet shows that dates is a set, and so you'd want to check if the set contains (rather than is equal to) the DateComponents object, as shown below: @Query(filter: #Predicate { $0.dates.contains(DateComponents(calendar: Calendar.current, year: 2025, month: 3, day: 4) } Best, —— Ziqiao Chen  Worldwide Developer Relations.
Mar ’25
@Query with Set
How do I filter data using @Query with a Set of DateComponents? I successfully saved multiple dates using a MultiDatePicker in AddView.swift. In ListView.swift, I want to retrieve all records for the current or today’s date. There are hundreds of examples using @Query with strings and dates, but I haven’t found an example of @Query using a Set of DateComponents Nothing will compile and after hundreds and hundreds of attempts, my hair is turning gray. Please, please, please help me. For example, if the current date is Tuesday, March 4 205, then I want to retrieve both records. Since both records contain Tuesday, March 4, then retrieve both records. Sorting works fine because the order by clause uses period which is a Double. Unfortunately, my syntax is incorrect and I don’t know the correct predicate syntax for @Query and a Set of DateComponents. Class Planner.swift file import SwiftUI import SwiftData 
 @Model class Planner { //var id: UUID = UUID() var grade: Double = 4.0 var kumi: Double = 4.0 var period: D
1
0
108
Mar ’25
How to add a reoccurring Hebrew Event to a calendar.
Currently Apple has their own calendar called Birthdays which takes the birthdays from contacts and makes it as a regular calendar event along with the birthday number, they even do this for Hebrew Birthdays. I have tried (unsuccessfully thus far) to take the same concept and create a calendar for reoccurring events on a specific date in the Hebrew Calendar. An example of this would be Yahrtzeits, which is observed on the Hebrew date each year after a person dies. I want to add it to the system calendars like how Apple does it this way it can be used with any app not just my own. Currently there isn't a way to specify the calendar (like Calendar(identifier: .hebrew) or even make a custom EKRecurrenceRule, also from some of the debugging of the Birthdays calendar, it seems that the date saved is the Gregorian date and that theres some internal calculations happening. Is there a way to add reoccurring Hebrew Events or do I need to reinvent
1
0
410
Nov ’24
Reply to How long does it take to get approved for the App Store Small Business Program
How i got approved in 2025 for of all, i was completely unaware of the program because Appstore Connect does not advertise it like the generous Google Play Console I only discovered it while checking my revenue stats and realizing that Apple was taking too much commission. After a quick Google search, I found out about the program. Well, let bygones be bygones. Better late than never 😀 I applied on February 27, and upon submission, I received an application receipt email stating that Apple would notify me once my enrollment was approved. However, I received no further emails in February. The FAQ on the application page mentioned: When will my adjusted proceeds go into effect? Your proceeds will be adjusted fifteen (15) days after the end of the fiscal calendar month in which your enrollment is approved. For example, if your enrollment is approved on February 10, 2022, your proceeds are adjusted starting March 14, 2022. Based on this, I assumed that if I were approved in March, my reduced 15% commiss
Topic: Business & Education SubTopic: General Tags:
Mar ’25
Added lots of in-App functionality, but Apple says: G4.2.2 - Minimum Functionality
Dear friends, I wouldn't be writing this article if I wasn't at a loss. I really don't understand the repeating reviewer’s decision: Guideline 4.2.2 - Design - Minimum Functionality We noticed that your app ‘ONLY’ includes links, images, or content aggregated from the Internet with limited or no native functionality. My App (NH2-STEFAN-COOH, Apple ID 6741710895) is a learning app for biochemistry students. In the first review, it was actually mainly a web viewer, so Apple was right at that time - it was my mistake, but I listened to them and made massive improvements adding lots of native stuff: When you start it for the first time, a welcome message appears, the user name is created and saved. A different biochemistry anecdote appears on the welcome page every day. This can be explained in detail. There are 31 different anecdotes and explanations, one for each day of the month. An ‘About’ section can also be clicked on the welcome page and from there the impression. If you click on ‘Entry to the world of bio
3
0
302
Mar ’25
HKAnchoredObjectQuery Stops Receiving Updates
I implemented this to receive updates for specific data types and keep the latest daily information up to date. However, for some reason, it only works for a while before stopping completely. Background Delivery internal func backgroundDeliveryForReadTypes(enable: Bool, types: Set) async { do { if enable { try await statusForAuthorizationRequest(toWrite: [], toRead: types) for type in types { try await healthStore.enableBackgroundDelivery(for: type, frequency: .daily) } } else { for type in types { try await healthStore.disableBackgroundDelivery(for: type) } } } catch { debugPrint(Error enabling background delivery: (error.localizedDescription)) } } HKQueryAnchor internal var walkingActivityQueryAnchor: HKQueryAnchor? { get { if let anchorData = UserDefaults.standard.data(forKey: walkingActivityAnchor) { return try? NSKeyedUnarchiver.unarchivedObject(ofClass: HKQueryAnchor.self, from: anchorData) } return nil } set { if let newAnchor = newValue { let anchorData = try? NSKeyedArchiver.archivedData(withRootObje
1
0
273
Mar ’25
Reply to Added lots of in-App functionality, but Apple says: G4.2.2 - Minimum Functionality
For more clarity, I add some screenshots: NATIVE welcome screen, using saved user name, showing tipp of the day. Link to detailed explanation of the tipp. Link to About (from here link to imprint). Link to Main Menu: NATIVE Main menu, SWIPED to LEFT page, link to learning planner, link to structure drawing game, link to lab calculators: NATIVE learning planner, above: choose start date to learn & select the time you have, middle: suggestion of learning plan, below integrate schedule in calendar app NATIVE structure drawing game, game board showing 25 tasks that can be selected NATIVE structure drawing game, one task selected, above: Draw lactate with draw board (actually showing the solution), middle: tipp how to draw the structure (is initially hidden and can be shown if desired), below: mark task as red/yellow/green NATIVE lab calculators with link to seven distinct calculators for different lab tasks NATIVE Main menu, SWIPED to RIGHT page, links to learn videos (above: will open as in-app over
Mar ’25
UNNotificationRequest set timestamp to a relative time
The system calendar when showing a calendar event shows a relative timestamp on the notification versus all other apps which have a timestamp of when the notification was sent. Is there a way to set the timestamp to be relative? I am currently working on a calendar app and we should be able to use the same system that apple uses for its own calendar. Post about this on stack overflow from someone else a few years ago
1
0
310
Mar ’25