Questions tagged [uicontrol]

In iOS UIKit, UIControl is the base class for control objects such as buttons and sliders.

Available in iOS 2.0 and later in UIKit. The main role of UIControl is to define an interface and base implementation for preparing action messages and initially dispatching them to their targets when certain events occur.

The UIControl class also includes methods for getting and setting control state—for example, for determining whether a control is enabled or highlighted—and it defines methods for tracking touches within a control. These tracking methods are overridden by UIControl subclasses.

You cannot use the UIControl class directly to instantiate controls. It instead defines the common interface and behavioral structure for all its subclasses.

440 questions
0
votes
4 answers

What is this iOS Contol and How To Implement it?

I'm confused about: 1) What type of control is the one shown in the picture above. I tried slider, it's not giving that same visual effect 2) How can I implement such a control exactly as seen on the image.
0
votes
1 answer

UIControl - addTarget: action: forControlEvents doesn't call the method inside selector

I have problem with adding target/action method to my app. Here's my code: -(void)printInConsole { NSLog(@"2"); } -(void)createGCButton { UIButton * LButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; LButton.frame = CGRectMake(200,…
Klemen
  • 2,144
  • 2
  • 23
  • 31
0
votes
1 answer

What happens if I add the same target/action to a gesture multiple times?

Am I asking for trouble if I add the same target/action pair to a UIGestureRecognizer -- or UIControl for that matter -- multiple times?
dugla
  • 12,774
  • 26
  • 88
  • 136
0
votes
1 answer

ios binding UIControlEventTouchUpInside to container does not make views in container to respond event

hi i have a container that has 2 subviews, an image and a label, i have binded the events to the container to respond to UIControlEventTouchUpInside, the whole idea is so that when user clicks anywhere on the container, including the image and…
user1118019
  • 3,819
  • 8
  • 40
  • 46
0
votes
2 answers

Overlapping UIControls in a View

Im creating a custom control which consist of two layers in a donut shape. The middle is a button, while the donut part is a rotation wheel. I have created the two parts as two individual UIControls with there own seperate images. My problem right…
JavaCake
  • 4,075
  • 14
  • 62
  • 125
0
votes
1 answer

Unknown class MHRotaryKnob in Interface Builder file

I hav a custom class which is a subclass of UIControl. Unfortunately i am not able to compile the code due to following error: Unknown class MHRotaryKnob in Interface Builder file. I have tried to add the MHRotaryKnob.m in Build Phases -> Compile…
JavaCake
  • 4,075
  • 14
  • 62
  • 125
0
votes
1 answer

iOS subclassing UIControl not responding

im doing a test for subclassing uiControl, but it is not working yet, here my code: MainVC.m:: - (void)viewDidLoad { [super viewDidLoad]; TesteaContol *tt = [[[TesteaContol alloc]initWithFrame:CGRectMake(20, 20, 80, 30)]autorelease]; …
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
-1
votes
1 answer

How to access the value of a UIControl from another UIView class

Beginner question. I have a UISlider on the storyboard, and in another UIView class besides the ViewController I would like to use the slider's value to change path/shape variables within the makeShape() function. I have tried: a) In OtherView, try…
Paul
  • 115
  • 2
  • 10
-1
votes
1 answer

Changing QLabel of PyQt from other python script

Script1 has Qlabel and Script2 is calculating some value. What I want to is change Content of Qlabel from coding in Script 2. For example, I wrote self.button_A.clicked.connect(test) I wrote, import script1 def test(): …
-1
votes
1 answer

Tap not working if SVG Image inside UIControl

I am writing an iOS App in Swift 4. I need a custom button with SVG image inside it. So, I added UIView in Storyboard scene > Changed it to UIControl as custom class > Traits: Button and User interaction Enabled. Then I added SVGView (Macaw) inside…
Sheikh Atif
  • 139
  • 2
  • 12
-1
votes
2 answers

Swift Generic methods for UIView subclasses

I want to create a generic method for all controls like UIButton, UILabel, UIView, UITextView, to draw underline for every control. Is it possible to write such a method for the above classes?
Manjeet Singh
  • 57
  • 1
  • 10
-1
votes
4 answers

Recognize user cut/swipe gesture (UISwipeGestureRecognizer)

I use below code and work for 'self.view' but doesn't work for imageview and for direction just can add one direction how to use four direction(right,left,uo,down)? UISwipeGestureRecognizer *swipe =[[UISwipeGestureRecognizer…
SajjadZare
  • 2,487
  • 4
  • 38
  • 68
-1
votes
1 answer

Matlab: delete struct element from GUI

The results of my matlab program are shown in a GUI in some textedits created dynamically based on the number of results, the user can edit those results and save it into a struct by pressin a button (by callback function). Now im trying to give…
-1
votes
1 answer

How does UIControl manage its target?

Apple: // the action cannot be NULL. Note that the target is not retained. - (void)addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents; Note that the target is not retained. while in…
XVXVXXX
  • 13
  • 3
-1
votes
2 answers

iOS - How To Make my view so that it doesn't respond to events

i have asked this question Changing UIView To be instance from UIControl Programmatically 24 minutes ago but i he didn't benefit me , so i typing this question in another form hoping that you can help me i have a view that its class is…
user3091937
  • 31
  • 1
  • 8
1 2 3
29
30