Post

Replies

Boosts

Views

Activity

Comment on 'height' is inaccessible due to 'internal' protection level error
This is the code for Color.Swift import UIKit class Color: UIViewController {        public struct Color {      public var r, g, b, a: UInt8            public init(r: UInt8, g: UInt8, b: UInt8, a: UInt8 = 255)      {        self.r = r        self.g = g        self.b = b        self.a = a      }    }    override func viewDidLoad() {      super.viewDidLoad()      // Do any additional setup after loading the view.    }        /*    // MARK: - Navigation    // In a storyboard-based application, you will often want to do a little preparation before navigation    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {      // Get the new view controller using segue.destination.      // Pass the selected object to the new view controller.    }    */ } extension Color {    static let clear = Color(r: 0, g: 0, b: 0, a: 0)    static let black = Color(r: 0, g: 0, b: 0)    static let white = Color(r: 255, g: 255, b: 255)    static let gray = Color(r: 192, g: 192, b: 192)    static let red = Color(r: 255, g: 0, b: 0)    static let green = Color(r: 0, g: 255, b: 0)    static let blue = Color(r: 0, g: 0, b: 255) }
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’21
Comment on Having In-App Notifications Vary By User in App
Update, after some time of testing and modifying, it seems that it's not the issue
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on Having In-App Notifications Vary By User in App
Sorry for just seeing this was asleep when you replied. Now that I look at it maybe it could have something to do with it? fromUser and currentUser should both represent different PFUsers.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on Repeated Crash Reports when I add code to a project
You are right. In ProfileSummary.swift I forgot to put `.environmentObject(ModelData()) in the ProfileSummary_Previews struct. Thank you.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on Thread 1: Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value
I appreciate it the code you provided worked thanks for the help.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Comment on FPS App crashes when compiling, “Thread 1: Swift runtime failure: Range requires lowerBound <= upperBound” error
It worked, thanks so much!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Comment on 'height' is inaccessible due to 'internal' protection level error
Update: I rewrote the last line in UIImage+Bitmap.swift to self.init(cgImage: cgImage) and it worked. Appreciate the help.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Comment on 'height' is inaccessible due to 'internal' protection level error
The convenience initializer is called within an extension not within itself. Also, I removed the class from Color.swift so it's just the public struct function and the extension function. I tried adding public init () {} and it did not work.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Comment on 'height' is inaccessible due to 'internal' protection level error
This is the code for Color.Swift import UIKit class Color: UIViewController {        public struct Color {      public var r, g, b, a: UInt8            public init(r: UInt8, g: UInt8, b: UInt8, a: UInt8 = 255)      {        self.r = r        self.g = g        self.b = b        self.a = a      }    }    override func viewDidLoad() {      super.viewDidLoad()      // Do any additional setup after loading the view.    }        /*    // MARK: - Navigation    // In a storyboard-based application, you will often want to do a little preparation before navigation    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {      // Get the new view controller using segue.destination.      // Pass the selected object to the new view controller.    }    */ } extension Color {    static let clear = Color(r: 0, g: 0, b: 0, a: 0)    static let black = Color(r: 0, g: 0, b: 0)    static let white = Color(r: 255, g: 255, b: 255)    static let gray = Color(r: 192, g: 192, b: 192)    static let red = Color(r: 255, g: 0, b: 0)    static let green = Color(r: 0, g: 255, b: 0)    static let blue = Color(r: 0, g: 0, b: 255) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Comment on 'height' is inaccessible due to 'internal' protection level error
I still get the same error at this line    let theHeight = bitmap.height
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21