Ann Knowledge Hub
  • 📚Home
  • Bash
  • 🔀git
  • 🤖AI / ML / Gen AI
    • Generative AI - A Primer
    • Course Notes - Google ML Intro
  • 🎯How To Guides
  • 🔖Good Reference Articles
  • 📳Mobile Development
    • iOS
      • Useful Information
      • Debugging Tricks
      • ViewController Concepts
      • Nullability Annotations
      • UI Testing XCTestUI
      • Xcode Concepts
    • Mobile Application Services
    • AB Testing
    • Firebase
    • Good Articles Blogs
    • iOS Troubleshooting
    • Cocoapods Troubleshooting
  • 💯Miscellaneous
    • Google Calendar API
  • 🌐Web Development
    • 📚Learning Resources
    • 🔎Troubleshooting Issues
Powered by GitBook

About Me

  • My blog
  • GitHub

© 2024 Ann Catherine Jose

On this page
  • See the Swift generated interface for Objective-C header file
  • Send deep link to an app in a simulator
  • See Background Color in UI views

Was this helpful?

Edit on GitHub
  1. Mobile Development
  2. iOS

Debugging Tricks

See the Swift generated interface for Objective-C header file

If you are accessing an Objective-C class from Swift, you can see the Swift interface of the ObjC file: - Open the header file in Xcode, eg: MyClass.h - Press the square button on top left of the main editor ("Related Items") and choose Counterparts - You will see the item "MyClass.h (Swift 4.2 Interface)". This file will show the Swift interface

Send deep link to an app in a simulator

The target app's Info.plist should have the URL scheme acj registered. There should be a simulator running with the app installed.

xcrun simctl openurl booted "acj://message/1000"

See Background Color in UI views

  • Set a background color for all your UI views in the storyboard

  • Add all those views to a an IBOutlet Referencing Outlet collections (right click and choose "New Ref Out Coll..."

  • Then in the viewDidLoad of your view controller, iterate through the colors and set the background color to clear

override func viewDidLoad\(\) {
  super.viewDidLoad\(\)

  // Clear background colors from labels and buttons.
  // backgroundColoredViews is a Reference Outlet collection created from the Storyboard

  for view in backgroundColoredViews {
    view.backgroundColor = UIColor.clear
  }
}
PreviousUseful InformationNextViewController Concepts

Last updated 6 years ago

Was this helpful?

📳