iOS UITextView debug question

Posted on 2012-09-09
Medium Priority
Last Modified: 2012-09-17
I have a UITextView called textField.

I successfully set the textField.text property with a button and I can successfully read the value of textField.text and pass it to a function.

My question is how the heck to I display the value of textField.text in the debug window?

I have tried the following and neither works -
po textField.text
po [textField text]

Thanks,  Kevin.
Question by:kevinvw1
1 Comment
LVL 15

Accepted Solution

Hamidreza Vakilian earned 2000 total points
ID: 38381819
Please notice that you cant print out values of an objects property in gdb. E.g. you cant use po textView.text; instead you should use the second syntax: po [textView text]
Secondly you probably have set a breakpoint somewhere in your code and then you tried po [textView text] in gdb; if it's not working thats because textView is not declared in the scope the time you were executing gdb command.
Put a beakpoint on one line after where you have set textView.text in your code and try the gdb command again.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email is way too noisy, prone to hiding the important stuff, and really becoming unreliable for critical/timely communications. There are better ways to communicate.
While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question