Get the name of the UITextView the user clicked in?

Posted on 2010-08-16
Medium Priority
Last Modified: 2013-11-25
I have a view with three different UITextView's... aTextView bTextView and cTextView... When a user clicks inside of one of these, I would like to return which one they clicked, either a, b, or c.  Can this be accomplished?

Question by:TWB_Systems

Expert Comment

ID: 33451654
Here is how you manage text views.


Look at the delegates for textviews & textFields - textFieldShouldBeginEditing, textViewShouldBeginEditing:
LVL 33

Accepted Solution

pgnatyuk earned 2000 total points
ID: 33451697
Like for any other view: add a tag and then in the action methods check if (sender.tag == 1) ....

Featured Post

Simple Misconfiguration =Network Vulnerability

In this technical webinar, AlgoSec will present several examples of common misconfigurations; including a basic device change, business application connectivity changes, and data center migrations. Learn best practices to protect your business from attack.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

607 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