What is the quickest way to clean up all warnings in all XIB / Storyboard files In Xcode 7
Asked Answered
M

1

2

In Xcode, whenever I see warnings (usually about misplaced elements) appear in the XIB / Storyboard, I have to:

  1. Select the container (Usually the containing view controller or the top most view)
  2. From the Xcode menu select Editor -> Resolve Auto Layout Issues -> All views in <container name> -> Appropriate action ( For instance: Update frames) to resolve the issues.

The above method takes requires steps and a bit time consuming to me. It would be great if I could: - Resolve all warnings for ALL view controllers in a storyboard/XIB file - Even better resolve ALL warnings of all storyboard/XIB files available in the project

If you have any idea please advise. Thanks!

Michaeu answered 17/9, 2015 at 12:58 Comment(0)
M
1

After trying many ways, I think for now this is the quickiest method I know:

  1. Open the Xcode issue navigator (see the image below)
  2. Type frame for in the text box at the bottom to filter layout issues.
  3. Click on the warning one by one and press Command + Option + =.

That's it!

Personally I also found out that doing this way can significantly shorten the time to click through all warnings:

  1. Use the left hand's index finger to press left Command key
  2. Use the left hand's middle finger to press left option (or alt) key
  3. Using right hand's pinky to press = key
  4. Use right hand's thumb to click on the touch pad, BUT don't move it on the touch pad so that I can always click on the FIRST warning

Xcode issue navigator

Michaeu answered 18/9, 2015 at 12:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.