I figured it out I decided to have it intersect but then after when it does go to a position where it's right next to tot using CGPoint. Thank you to everyone that helped.
Post
Replies
Boosts
Views
Activity
Im wondering if there is a touch modifier I can add so that it touches tot but does not overlap it.
I want it like this view is white black is tot ▭▬ not like this ❏ if that makes any sense. I don't want the labels overlapping.
Is there a way to make the intersection only at outside of the shape and not have it go inside?
I defined constraints but when I increase the width of my freeform the lines get bigger and I lose one in my ui. How can I have a one size fits all?
I took my 2 stackviews out of the container but when I have vertical spacing with them to the text it collapses.
Okay so I should not have my stackviews be apart of a container.
Yeah I was able to get it to work finally with notifications and observers. I made one of each for my calROA() method.
It's in its own vc, I have 4 container viewcontrollers that are embedded in the parent. I'm gonna try notification and observer. I won't confuse view and viewcontroller again.
Okay this is the code for one of my sliders in a child view. I want the calROA() method from the parent to be avaliable in the cAssMove function.
@IBAction func cAssMove(_ sender: Any) {
cAssetsHeight.constant = CGFloat(cAssetsSlider.value)
scaleCA = Int(6.75675675676 * cAssetsSlider.value)
cAssetsNum.text = "\(scaleCA)"
if scaleCA < 316 {
cAssetsLabel.text = ""
} else {
cAssetsLabel.text = "Current \n Assets"
}
}
My child class is a container of my parent class and it contains a slider that moves a view that updates a label with a number.
Yes I scroll the container view and I don't want that container to move. Is there any way I can upload images, I think that can make you understand better?
The container view should not move it should be still like the text.
Yeah it's like a container view but without a childvc. I don't want the container to move when I scroll. I have a video of the issue but this site is not letting me post it.
my text labels for example all have UILabel? nil. Part of my func update in the first question.Code 1: ImageControllerclass FetchImage {
func fetchItemArtwork(url: URL, completion: @escaping (UIImage?) -> Void) {
let task = URLSession.shared.dataTask(with: url) { (data, response, error) in
if let data = data,
let image = UIImage(data: data) {
completion(image)
} else {
completion(nil)
}
}
task.resume()
}
}Code 2: CurrentPlayer classimport Foundation
struct CurrentPlayer: Codable, Hashable {
let photoUrl: URL
let firstName: String
let lastName: String
let positionCategory: String
let team: String
enum CodingKeys: String, CodingKey {
case photoUrl = "PhotoUrl"
case firstName = "FirstName"
case lastName = "LastName"
case positionCategory = "PositionCategory"
case team = "Team"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
photoUrl = try values.decode(URL.self, forKey: CodingKeys.photoUrl)
firstName = try values.decode(String.self, forKey: CodingKeys.firstName)
lastName = try values.decode(String.self, forKey: CodingKeys.lastName)
positionCategory = try values.decode(String.self, forKey: CodingKeys.positionCategory)
team = try values.decode(String.self, forKey: CodingKeys.team)
}
}