Text search though all .xib files in Xcode?

后端 未结 10 497
遥遥无期
遥遥无期 2020-12-22 19:35

This seems like such a basic task, but I\'m stumped.

How, in Xcode, do you execute a textual search though (the XML contents of) all the .xib files in a project?

10条回答
  •  天命终不由人
    2020-12-22 20:00

    U may use this function in your bash profile:

    function grep_xib {
        grep -i -r --include=*.xib "$1" .
    }
    

    Then just call in terminal "grep_xib TEXT_TO_FIND". It's easier.

    To create a .bash_profile on your mac follow this steps:

    • Start up Terminal
    • Type "cd ~/" to go to your home folder
    • Type "touch .bash_profile" to create your new file.
    • Edit .bash_profile with your favorite editor (or you can just type "open -e .bash_profile" to open it in TextEdit.
    • Type ". .bash_profile" to reload .bash_profile and update any functions you add.

提交回复
热议问题