Today, on Dec 14, when I look for units or sales, all that occurred after December 3rd is ignored.
Tens were downloaded since dec 3rd, and I could see them when connecting earlier today.
When I want to set the time period, I see that any date beyond Dec 3rd is greyed (see attached screenshot).
It used to work a few hours ago. This occurred immediately after updating MacOS to 14.2, but I tested on a Mac running 12.6 with the same result.
Is it only me or does anyone see the same issue ? I filed a bug report: FB13468285
I had this code working properly in Xcode 17.0.1, with macOS target as 12.4
struct SyntheseView: View {
@AppStorage("isDarkMode") var isDarkMode = false
// more declarations ………
var body: some View {
VStack {
ZStack {
// code …………………
}
.frame(width: 500, height: 300)
.background(isDarkMode ? Color(red: 0, green: 0, blue: 120/255) : Color(red: 1, green: 1, blue: 186/255))
} // VStack
In Xcode 15.3, I get the error The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
If I comment out the background modifier, no issue.
I converted all parameters in Color to Double without success
If I replace by a fixed color as
.background(.blue)
No error.
Even the simple
.background(Color(red: 0.0, green: 0.0, blue: 0.5))
causes the error.
But:
.background(isDarkMode ? .blue : .red)
does work.
I tried to define the Colors as static color extensions to no avail.
Another bizarre point is that a similar pattern works OK for another View.
Did something change in Xcode 17.3 ?
Post not yet marked as solved
I've noticed there is a new 'Same Here' button showing on any post (except your own posts).
I first thought it was a link to a similar question… Specially when the button just says 'Same here' without any badge value. But no, it is just similar to a like…
I guess the goal is to avoid and speed up instead of posting a reply or a comment 'Same here'.
Unfortunately, it is not possible to undo and no way to know who posted.
As your own posts do not show the button, does it mean you cannot know how many share the same issue than the one you posted ? If so, that's bizarre. Hope it will show the counter at least when it is non zero.
Let me see how many 'Same here' on this post…
.
Post not yet marked as solved
This app allows to take photos.
It works OK, but since recently I get the following error message:
ERROR: PHOTO not found in table CameraUI-SpatialVideo of bundle CFBundle 0x283e96220 </System/Library/PrivateFrameworks/CameraUI.framework> (not loaded)
What is this spatial video ? I'm just using still images, not using CameraUI.framework.
I know it is not a developer question, but getting the answer may help understand what we can get or not get on Apple Watch after Watch10.
Since WatchOS10.2 when swiping face, time is always displayed first as 10:09:31 before setting the correct time one second later. Just in the same way as a long press. But the interest of swipe is to have immediately a different face displaying the correct time.
Why is it so ? Is it due to (probably) now using SwiftUI ? Or is it a quick fix, reusing most of code for Lon,g press case ?
It did not behave so with WatchOS 9 or before. Is there a setting to change ? It is really inconvenient (and ugly).
I filed a bug report: FB13466486
This is an often asked question, but I just have a partial answer so far.
There are some views (not all) that I need to present in Portrait only when running on iPhone.
If I come from a TabBar, I just add the following code in the TabBar controller
override open var supportedInterfaceOrientations : UIInterfaceOrientationMask {
if UIDevice.current.userInterfaceIdiom == .phone {
return [.portrait, .portraitUpsideDown]
}
}
But I need to do the same when I get to the destination VC by a segue fired from a plain UIViewController or a Cell in a TableView.
If I put the code in the destination controller, it has no effect.
If I put in the originating VC, it works when segue is triggered from code (case 2 below).
But I cannot make it work when segue is triggered in storyboard from the accessory action in the cell of the TableView.
Where should I declare the supportedInterfaceOrientations ?
Should I do it in the navigation root ? If so, how ?
I tried in an extension UINavigationController, to no avail.
or should I trigger the segue from accessory, not directly in storyboard but through an IBAction in code ?
If that may help, an overview of storyboard setup:
Also tried solution described here to no avail either: https://www.appsdeveloperblog.com/disable-rotation-of-uiviewcontroller-embedded-into-uinavigationcontroller/
Post not yet marked as solved
I have a view in storyboard, with a tableView and a coloured UIView.
The UIView is declared after tableView, so it appears on top of tableView.
However, it appears semi transparent over the tableView.
In addition, I cannot set its alpha channel to values other than 1 or 0 (e.g., 0.9)
But if I create the view programmatically, the view if fully opaque as expected.
What am I missing ?
Here is the set up.
I have a UITableViewController (controller 1), to which I get from a controller (0)
As I need to add a searchView atop the tableView, I addSubview to the superview.
This is done in viewWillAppear
self.view.superview?.addSubview(searchView) // AboveTableView
searchView.isHidden = true
print("willAppear", self.view.superview, self.tableView.superview)
It works perfectly well, I get:
willAppear Optional(<UIViewControllerWrapperView: 0x103d2eef0; frame = (0 0; 393 852); autoresize = W+H; layer = <CALayer:
From this VC, I segue to another VC (2) with a show segue and comes back with an unwindSegue to return to (1).
Problem is that no, superviews are nil.
@IBAction func unwindToTableViewController(_ sender: UIStoryboardSegue) {
print("unwind", self.view.superview, self.tableView.superview)
}
gives
unwind nil nil
If I step back from this controller (1) to the controller (0) from which I segued and segue again to the TableViewController (1), everything works as expected.
In addition, if I go from 1 -> 2 by instantiating (2), everything works OK when I unwind to (1).
I know a solution is to refactor code replacing UITableViewController with a UIViewController and embed a TableView inside. But I would like to understand why my present design does not work.
I read in Xcode 15.2 release notes that @IBDesignable and @Inspectable are deprecated and will disappear in a future release.
After the abandon of WatchKit and its storyboard, replaced by SwiftUI, does it mean storyboards (and consequently UIKit) will progressively disappear, leaving developers alone with SwiftUI to design apps (IMHO, inadequate to design complex UI: for instance, I always struggle to position precisely objects for all devices sizes as we miss constraints manager in SwiftUI) ?
For sure, IBDesignable is (was) whimsical, but a very useful tool to design sophisticated UI. Replacing by #Preview does not make it.
I also understand that Xcode is a very complex piece of code and that maintaining and evolving some tools (as IBDesignable) requires effort. But isn't it what we expect from Apple ? To provide us with the best tools and keep on the promise of WYSIWYG environments, all along ?
Is it only me or do others share this view ?
Post not yet marked as solved
I get this error in console in a SwiftUI MacApp on Xcode 15.0.1 and MacOS 14.1.2
FAULT: <NSRemoteView: 0x11f03bc00 com.apple.TextInputUI.xpc.CursorUIViewService TUICursorUIViewService> determined it was necessary to configure <TUINSWindow: 0x11f1b2390> to support remote view vibrancy
I found similar errors that seem to be harmless messages popping up: https://developer.apple.com/forums/thread/72133
No idea what can cause such message, even less how to correct it.
I try to rotate a page 180° in a pdf file.
I nearly get it, but the page is also mirrored horizontally.
Some images to illustrate:
Initial page:
Result after rotation (see code): it is rotated 180° BUT mirrored horizontally as well:
The expected result
It is just as if it was rotated 180°, around the x axis of the page. And I would need to rotate 180° around z axis (perpendicular to the page). It is probably the result of
writeContext!.scaleBy(x: 1, y: -1)
I have tried a lot of changes for transform, translate, scale parameters, including removing calls to some of them, to no avail.
@IBAction func createNewPDF(_ sender: UIButton) {
var originalPdfDocument: CGPDFDocument!
let urls = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
let documentsDirectory = urls[0]
// read some pdf from bundle for test
if let path = Bundle.main.path(forResource: "Test", ofType: "pdf"), let pdf = CGPDFDocument(URL(fileURLWithPath: path) as CFURL) {
originalPdfDocument = pdf
} else { return }
// create new pdf
let modifiedPdfURL = documentsDirectory.appendingPathComponent("Modified.pdf")
guard let page = originalPdfDocument.page(at: 1) else { return } // Starts at page 1
var mediaBox: CGRect = page.getBoxRect(CGPDFBox.mediaBox) // mediabox which will set the height and width of page
let writeContext = CGContext(modifiedPdfURL as CFURL, mediaBox: &mediaBox, nil) // get the context
var pageRect: CGRect = page.getBoxRect(CGPDFBox.mediaBox) // get the page rect
writeContext!.beginPage(mediaBox: &pageRect)
let m = page.getDrawingTransform(.mediaBox, rect: mediaBox, rotate: 0, preserveAspectRatio: true) // Because of rotate 0, no effect ; changed rotate to 180, then get an empty page
writeContext!.translateBy(x: 0, y: pageRect.size.height)
writeContext!.scaleBy(x: 1, y: -1)
writeContext!.concatenate(m)
writeContext!.clip(to: pageRect)
writeContext!.drawPDFPage(page) // draw content in page
writeContext!.endPage() // end the current page
writeContext!.closePDF()
}
Note: This is a follow up of a previous thread,
https://developer.apple.com/forums/thread/688436
I notice that several (most) tags are not accessible now (Nov 2, 19:30 GMT). For instance
https://developer.apple.com/forums/tags/ios
https://developer.apple.com/forums/tags/uikit
https://developer.apple.com/forums/tags/macos
https://developer.apple.com/forums/tags/appkit
https://developer.apple.com/forums/tags/xcode
https://developer.apple.com/forums/tags/interface-builder
all with the same error: The page you’re looking for can’t be found
But others are:
https://developer.apple.com/forums/
https://developer.apple.com/forums/tags/swift
Is it only me ?
Since a few days, I do not receive any mail notification on answers to mail. Is it only me ?
Post not yet marked as solved
If I run the exact same code on MacOS 12.7 (Xcode 14.2) and MacOS 15.0.1 (Xcode 15.0.1).
In a scrollView, I display lines (lineDivider) and then a LazyVgrid, applying some offset:
ScrollView(.vertical) {
ForEach(1...50, id: \.self) { index in
LabelledDivider(label: "\(index)", color: .gray.opacity(0.1))
.offset(y: CGFloat(65*index - 50)
}
LazyVGrid(columns: gridItemLayout, spacing: 33 ) {
ForEach ($allItems.theItems) { $item in
ItemView(item: item)
}
}
.offset(y: 40)
}
In Xcode 14.2, I get the first layout and in Xcode 15.0 the second on right:
The divider line is at the same position, but the view in grid is not.
If I change
.offset(y: 40)
to
.offset(y: 60)
I get the same layout.
So my questions:
did anyone observe similar change ?
is it due to Xcode, to MacOS ?
Is it documented somewhere ?
Since the maintenance 2 days ago, it seems editor has issues. Is it only me ?
Marking a text as quote does nothing. I mark this sentence as Quote to illustrate.