UICollectionView vision becomes small for a few seconds when cell tap
See image
[Before]
[After]
In practice, when I press on the cell (tap) it should tag the element, on iOS 17 it works perfectly, on iOS 15.8.1 however it has the ugly effect of shrinking the entire content of the collectionview for a few seconds.
Can anybody help me ?
I don't know where to look anymore
Interface Builder
RSS for tagBuild interfaces for applications without writing code using Interface Builder, an editor within Xcode.
Posts under Interface Builder tag
47 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
xcode version: Version 15.3
I successfully build app with xcode.
And when I tried to distribute app on appStore, Xcode keeps being killed without any error log.
I also rebooted computer.
It seems it killed in signing progress,, but it is configured singing well.
I have a collelctionview inside a tableview cell in UIKit. The cells of the collectionview have dynamic content and their height and width depends on the content, which decides the height of the collectionview inside tableview cell. I have used many methods to calculate height correctly at first and as I scroll the tableview or perform any button action, the height does not gets correctly to me. Please provide a good solution or replacement for this problem.
I’d like to add text in my dialogs to explain features and then hide the text and shrink the dialog after it’s been seeN. Is there are show/hide or a more/less function that can be used in dialogs?
I have successfully created the Intents UI Extension file for the wallet, obtained the requisite certificate, and adhered to the MeaWallet guidelines. Additionally, I have generated a sandbox login ID and successfully logged into the simulator using the sandbox login ID.
In an attempt to integrate the Intents UI Extension file into an existing project, I followed these steps: Debug -> Attach to Process by PID or Name. Subsequently, I conducted a search for the Intents UI Extension file name, selected the appropriate file, and clicked the attach button. However, Xcode is currently displaying 'waiting for attachment.'
Despite these efforts, I encountered an issue where the wallet extension controller is unable to access the application when attempting to run it.
Hello Folks!
I'm new to Xcode and I'm trying to create a simple 2D-Game with c++ and I found out, that SFML offers a nice tool to create a game engine. Now my purpose is to develop tools for studying and I'm trying to link SFML with Xcode. Since I already was successful in creating a pop-up window via the terminal I believe I can handle to do it with Xcode. I tried the following: I created a new SFML project in Xcode with the same Main.cpp file. I went to the build settings and changes the Header-Path to the SFML-Include folder and the Library-Path to the SFML-lib folder. I also linked the binaries with the libraries in the build phase. When I run the script Xcode told me, that the build was successful and the app tried to open the window (It jumped around and appears in the strip. But I also got an error message, that the dynamic libraries couldn't load.
It would be very nice, if someone could help me with my issue.
Happy to hear from you, kind regards
Jeremy
I have seen similar problems reported but find myself unable to fix this.
I have datePicker and a segmented control as subviews in a stack, built on the interface builder. These display on the interface builder with the correct white color text but once the app builds on the simulator, it displays as black text.
I have tried setting the value for the color in viewDidLoad using:
datePicker.setValue(UIColor.white, forKeyPath: "textColor")
but with no luck.
I'm not sure if the fact they are in a subview is the problem, and I'm just missing a tick box somewhere? It's especially confusing that it seems to display properly on the storyboard but as soon as the app loads it reverts to black. Could this be a bug in Xcode?
Many thanks for any help.
I have a UIScrollView that works perfectly on simulators for all the devices and orientations. However, whenever I try to do testing of the App on an actual device, the UIScrollView is all black. In addition, it looks like it scrolls since there's a scroll bar along the edge that moves when I try to "scroll" the black box. However, when I change orientations of the device, it no longer even does that.
I have stopped the App at various points to test out the heights and widths of the various views and they all look good. Yet, nothing but a black box shows up on the device.
Any thoughts?
Thanks.
I'm experimenting with the relatively new (to me) compact DatePicker. I'd like a column of aligned fields, the first two on top are date pickers for user input, the ones below that are dates outputted in textfields calculated from dates input by user. In Interface Builder in Xcode, it looks mostly like I want it, black text centered in white rectangular text fields. But in production on my iPhone, the DatePickers are functional, but they are not centered and they appear on a gray background. I haven't been able to figure out what settings to adjust to make the DatePicker's date centered and on white background. Screenshots attached. Grateful for help.
--JS
I have an issue where I see bottom navigation bar "menu". I created a menu so I don't need that default navigation bar. I just want to delete it so it does not shows at all. Any tips? To be clear I need to delete that "gray" bar behind white menu.
Hi everyone. I want to add a label to the view controller by pressing ctrl and dragging it into the code but it doesnt let me. With a button, this works perfectly but with a label it won't work. Any ideas why? Or how I can do it in another way? Thanks
Hello,
For the past month, I've been learning to use UIKit on Xcode to prepare for the Swift Student Challenge. However, I can't find a way to use my newly acquired skills in App Playgrounds. Do they strictly require SwiftUI? Is there a way to use UIKit and Storyboards?
I have started a course on IOS app development. I learnt about basic stuff about the interface like how to add buttons and constraints and stuff. Now I need to add the function to the button in the assistant editor. But it does not let me edit, delete or type anything with it.
First I thought i opened the wrong editor but I even tried a shortcut ( control + option + command + return ) and it opens the same editor. I have been stuck on this for the past week. Please suggest :)
I’m having problems implementing a rather simple concept in a Storyboard (for backward compatibility) using IB, and am wondering if I can ask for help using one of my TSI’s? I’m trying to create a simple 5 or 6 text line app, which takes up about half an iPhone 12 screen in portrait, but then still only takes up about half the screen when rotated into landscape? I haven’t figured out how to do this. Trying to insert some blank imageviews as vertical separators, but can’t get them to be proportional when rotated. Also, please be kind - I’m a COBOL/FORTRAN/Assembler programmer from the 60’s and struggling through the Swift era. I did have a few apps on the app store at one time (objective C), but that was a while ago and struggling to keep up. Thanks in advance.
I've encountered while attempting to integrate SwiftUI into an existing UIKit project. Specifically, I have experienced recurring view crashes when creating new SwiftUI views within the project. My Feedback id is FB13509337
I would appreciate your assistance in resolving this matter promptly, as it is critical to the development of our application. Your prompt attention to this issue would be greatly appreciated
So, i am making an app in which you enter coordinates, confirm them, and then an arrow pops up that shows the direction to the place which coordinates user entered. However when i click confirm, the arrow shows up but doesnt rotate. When i tried some troubleshooting, i found out that arrowImageView is nil. Can anyone please help?
`
import UIKit
import CoreLocation
extension CGFloat {
func toRadians() -> CGFloat {
return self * CGFloat.pi / 180.0
}
}
class ViewController: UIViewController {
@IBOutlet weak var Latitude_text: UITextField!
@IBOutlet weak var Longitude_text: UITextField!
@IBOutlet var arrowImageView: UIImageView!
let locationManager = CLLocationManager()
var destinationCoordinate: CLLocationCoordinate2D?
override func viewDidLoad() {
super.viewDidLoad()
locationManager.delegate = self
locationManager.requestWhenInUseAuthorization()
locationManager.startUpdatingLocation()
locationManager.startUpdatingHeading()
}
@IBAction func Latitude_import(_ sender: Any) {
validateCoordinates()
}
@IBAction func Longitude_input(_ sender: Any) {
validateCoordinates()
}
@IBAction func confirmButtonTapped(_ sender: UIButton) {
validateCoordinates()
performSegue(withIdentifier: "ShowArrowScreen", sender: self)
}
func validateCoordinates() {
guard
var latitudeText = Latitude_text?.text, !latitudeText.isEmpty,
var longitudeText = Longitude_text?.text, !longitudeText.isEmpty
else {
// Handle empty fields
print("Invalid coordinates. Please enter valid latitude and longitude.")
return
}
// Replace commas with dots
latitudeText = latitudeText.replacingOccurrences(of: ",", with: ".")
longitudeText = longitudeText.replacingOccurrences(of: ",", with: ".")
guard let latitude = Double(latitudeText),
let longitude = Double(longitudeText)
else {
// Handle invalid text
print("Invalid coordinates. Please enter valid latitude and longitude.")
return
}
destinationCoordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
updateUIWithBearing()
}
func calculateBearing(from source: CLLocationCoordinate2D, to destination: CLLocationCoordinate2D) -> Double {
let theta = atan2(destination.longitude - source.longitude, destination.latitude - source.latitude)
return (theta * (180.0 / .pi) + 360.0).truncatingRemainder(dividingBy: 360.0)
}
func updateUIWithBearing() {
guard let currentLocation = locationManager.location, let destination = destinationCoordinate else {
print("Error: Could not retrieve location or destination coordinates.")
return
}
let bearing = calculateBearing(from: currentLocation.coordinate, to: destination)
print("Bearing to destination: \(bearing) degrees")
rotateArrow(bearing: CGFloat(bearing))
}
func rotateArrow(bearing: CGFloat) {
print("Rotate Arrow function called.")
guard let arrowImageView = arrowImageView else {
print("Error: Arrow image view is nil.")
return
}
guard let frameworkBundle = Bundle(identifier: "com.myframework.name") else {
print("Error: Unable to load framework bundle.")
return
}
guard let arrowImage = UIImage(named: "myImage", in: frameworkBundle, compatibleWith: nil) else {
print("Error: Arrow image is nil.")
return
}
arrowImageView.image = arrowImage
let radians = bearing.toRadians()
UIView.animate(withDuration: 0.5, animations: {
arrowImageView.transform = CGAffineTransform.identity.rotated(by: radians)
}) { _ in
print("Rotation animation completed.")
}
}
}
extension ViewController: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) {
let heading = newHeading.trueHeading
print("Current heading: \(heading) degrees")
}
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if let location = locations.last {
print("Updated location: \(location.coordinate.latitude), \(location.coordinate.longitude)")
}
}
}
Hi. I can't add a Button component to my cocoa resource (.nib) I have xCode version 15.1.
Hi, I Just Updated MacOS and XCode and then tried to Build App. Now it suddenly started throwing Error: Command CompileStoryboard failed with a nonzero exit code
I've tried a few solutions but none worked.
Got following Error:
2023-12-27 16:14:06.315 ibtoold[70732:612834] [MT] DVTAssertions: ASSERTION FAILURE in IDEInterfaceBuilder/AutolayoutFoundation/Model/Constraints/IBLayoutConstraint.m:1141
Details: We only understand width/height, not 0x3
Object: <IBLayoutConstraint: 0x600001772c80>
Method: -absoluteGeometricDescriptionInCoordinateSpaceOfView:userInterfaceLayoutDirection:ofItem:attribute:
Thread: <_NSMainThread: 0x600002e780c0>{number = 1, name = main}
Hints:
Backtrace:
0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[IBLayoutConstraint absoluteGeometricDescriptionInCoordinateSpaceOfView:userInterfaceLayoutDirection:ofItem:attribute:] (in IBAutolayoutFoundation)
4 -[IBLayoutConstraint geometricDescriptionInCoordinateSpaceOfView:userInterfaceLayoutDirection:] (in IBAutolayoutFoundation)
5 -[IBLayoutConstraint geometricCompare:withUserInterfaceLayoutDirection:] (in IBAutolayoutFoundation)
6 -[IBLayoutConstraint compare:withUserInterfaceLayoutDirection:] (in IBAutolayoutFoundation)
7 __63-[NSView(IBViewIntegration) ibConstraintComparatorForDocument:]_block_invoke (in IDEInterfaceBuilderKit)
8 __CFSimpleMergeSort (in CoreFoundation)
9 __CFSimpleMergeSort (in CoreFoundation)
10 CFSortIndexes (in CoreFoundation)
11 -[NSMutableOrderedSet sortRange:options:usingComparator:] (in CoreFoundation)
12 -[NSView(IBViewIntegration) ibPrimitiveAddConstraintsToCandidateListOnly:thatAreAlreadyInDocument:] (in IDEInterfaceBuilderKit)
13 __53-[NSView(IBViewIntegration) _ibUnarchiveConstraints:]_block_invoke_2 (in IDEInterfaceBuilderKit)
14 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
15 __NSDictionaryEnumerate (in CoreFoundation)
16 __53-[NSView(IBViewIntegration) _ibUnarchiveConstraints:]_block_invoke (in IDEInterfaceBuilderKit)
17 __76-[IBDocumentUnarchiver registerDelayedReferenceUnarchivingOfType:withBlock:]_block_invoke_2 (in IDEInterfaceBuilderKit)
18 -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
19 __76-[IBDocumentUnarchiver registerDelayedReferenceUnarchivingOfType:withBlock:]_block_invoke (in IDEInterfaceBuilderKit)
20 -[IBDocumentUnarchiver enableUnarchivingReferencesOfType:] (in IDEInterfaceBuilderKit)
21 -[IBDocument unarchivePlatformIndependentDataWithUnarchiver:error:] (in IDEInterfaceBuilderKit)
22 -[IBStoryboardDocument unarchivePlatformIndependentDataWithUnarchiver:error:] (in IDEInterfaceBuilderKit)
23 -[IBDocument unarchiveDocumentWithUnarchiver:error:] (in IDEInterfaceBuilderKit)
24 __48-[IBDocumentUnarchiver unarchiveDocument:error:]_block_invoke (in IDEInterfaceBuilderKit)
25 -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
26 -[IBDocumentUnarchiver unarchiveDocument:error:] (in IDEInterfaceBuilderKit)
27 __61-[IBDocument decodeContentsOfURL:ofType:decodingStyle:error:]_block_invoke (in IDEInterfaceBuilderKit)
28 -[IBDocumentAutolayoutManager ignoreAutolayoutStatusInvalidationDuring:] (in IDEInterfaceBuilderKit)
29 -[IBDocument ignoreAutolayoutStatusInvalidationDuring:] (in IDEInterfaceBuilderKit)
30 -[IBDocument decodeContentsOfURL:ofType:decodingStyle:error:] (in IDEInterfaceBuilderKit)
31 -[IBDocument readFromURL:ofType:error:] (in IDEInterfaceBuilderKit)
32 IBLoadDocument (in ibtoold)
33 -[IBCLIInterfaceBuilderToolPersona invokeArguments:outputDictionary:] (in ibtoold)
34 -[IBCLIInterfaceBuilderToolPersona runSingleInvocation:outputtingToFileHandle:andVerifyingEnvironment:] (in ibtoold)
35 IBCLIServerRunSingleInvocation (in ibtoold)
36 __IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess_block_invoke_2 (in ibtoold)
37 __IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess_block_invoke (in ibtoold)
38 -[IBCLIErrorForwarder forwardErrorOutputToDescriptor:whileInvokingBlock:] (in ibtoold)
39 IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess (in ibtoold)
40 main (in ibtoold)
41 start (in dyld)
Command CompileStoryboard failed with a nonzero exit code
Any help would be highly Appreciable.
I am creating and selling a third-party SDK. The framework includes a subclass of UIViewController named BaseViewController. I also provide the subclass of BaseViewController (ChildViewController) as *.swift source code and xib file to be integrated into the application along with the *.framework.
I encountered an issue during this integration.
I cannot access the view property of the parent class UIViewController from .xib file of the ChildViewController which is integrated into the application.
Please advise me on how to avoid this issue.
I have prepared specific source code and screenshots.
I will attach them and send them in a subsequent email.
I'm using iXGuard for my Unity Project and need to build on XCode with iXGuard Toolchains (Xcode menu -> Toolchains -> select iXGuard Toolchains, and also need to add a new script for Post Action (Product -> Scheme -> Edit Scheme -> Archive -> Post-actions )
The question is how can I setup/add in Unity to configure for it instead of manual configure on Xcode?