I'm trying to use find / replace in Xcode to replace some deprecated functions however it seems to be greyed out for some reason. I'm still finding my way round Xcode so it may be for something simple, but I can't find what it's unavailable?
Thanks
I'am using Xcode 6.1, find&replace working fine for me. You just type the replace text and press return key
When you open, it appears to be greyed out
Press return key after entering text
Related
This issue is for Xamarin iOS apps built in Xcode 14.0 and running in iOS16.0.
Where a page title is set other than in the page constructor (for example in OnAppearing), the page title is not shown - missing - when first displayed. If you push out of the page and later return to it, now the title will be displayed.
This appears to be caused by an Apple bug in iOS 16.0 / Xcode 14.0. Two ways to work around it:
Move your title-setting code to the page constructor.
Leave the title-setting code where it is and add the following to the page constructor:
Title = "\uFEFF"; // Non-printing non-blank Unicode character
Apparently, if the Title is null, empty or blank in the constructor, the alpha of the text is set to 0.
No doubt Apple will fix this in later versions, but the problem remains for the current versions I believe.
Apple has re-designed the share sheet that appears, which has now broken my UI tests.
I have attempted to record a new UI test through Xcode, but as soon as I tap on the dismiss button, the test terminates so I have not been able to capture the event.
Ultimately, I just want to know how I can access the gray 'X' shown with the arrow below:
I have just tested this with Xcode 13 and have found that the original answer no longer works. However, I am keeping it for posterity, or those using previous versions of Xcode.
Xcode 13
I have tested this with Xcode 13.0 and verified it works for iPhone and iPad:
let activityListView = app.otherElements.element(matching: .other,
identifier: "ActivityListView")
XCTAssertTrue(activityListView.waitForExistence(timeout: 2.0))
activityListView.buttons["Close"].tap()
Previous versions
After some trial and error, I was able to locate where my specific elements were with the following:
app.otherElements.element(boundBy: 1).buttons.element(boundBy: 0).tap()
Using app.otherElements.element(boundBy: 1) would identify the share sheet for me. I had attempted to locate it through accessibility identifiers, but I could not find one that worked, including previously valid ones used in iOS 12 and below.
Please note that based on the layout of your screen, the index value
may differ from what I am seeing.
Next, .buttons.element(boundBy: 0).tap() was used to locate the Close button. I again attempted to use identifiers, but could not find anything that represented the button.
When I attempted to discern additional information through the console while testing, I would always wind up crashing the test. This result was surprising, as I was able to query these elements with Xcode 10.
Ultimately, I would like to find working identifier values so that I can have something that works reliably across products, without the trial and error to find the share sheet's index value.
For iPad
The following will dismiss the popover for an iPad:
app.otherElements["PopoverDismissRegion"].tap()
I see a new shiny Swift-Icon in the opening mode from Xcode 10 (See screenshots). Can someone clarify what function is behind that icon.
We suppose that only swift files would showed, but that is not the case. Tested with an mixed project.
Thanks in advance :)
Hamish's comment is correct. When the Swift icon is solid blue, it means Xcode will show you the compiler-generated Swift interface corresponding to the selected header file.
In XCode 8.3.3 and below when a code snippet was highlighted and you hit enter, XCode would replace the snippet type with the actual type.
Now when you hit enter it deletes the placeholder type. I've looked around in preferences and cannot find a setting to revert this.
Any help?
Shift + Enter should leave the highlighted text in place
Upgraded to Xcode 10 and it solved the issue
I was creating a simple app in Xcode 8.1 with swift 3 and I got this problem (picture): dashes under buttons symbols.
How can I fix this issue?
Thanks.
So Nirmit dagly (https://stackoverflow.com/users/3401707/nirmit-dagly) has given the exact solution and it works perfectly.
He says: "You need to check button style on your iPhone device's setting. To check please go to General -> Accessibility -> Button Shapes. If it is enabled, then make it disable and run the app again. It'll hide the underlines from buttons."
I do thank him for his helpful answer and I has republish it here for the benefit of others.
Thank you again Nirmit and I prefer if we can get other independent solutions(not linked to the parameters of the phone user.).