I need a control in the form of a circle, which will change the volume by closwise and conterClockwise moves
Analog volume slider
Does anybody met this control?
This is for OSX Cocoa: http://www.sticksoftware.com/software/CircularSlider.html
But regulary theese controls are vertical sliders like controls with different style.
After you tap the UIView the control observe the vertical distance between the tappoint and the UIControl. This works great on desktop. But if you work with small places the vertical slider will be better choice.
Related
In LO/OO Writer vertical scrolling can be done e.g. by moving the text cursor up/down, using the mouse wheel, clicking the up/down arrows on the vertical scrolling bar, etc.
Touch scrolling (on touch screens) is not supported, unfortunately. Therefore I wrote a tool (in Autohotkey) which enables touch scrolling. It is working fine, but the scrolling is not as smooth as in other programs supporting touch scrolling: the content of the window is moved in steps of approx. one line.
In my tool I am using the best 'control' for scrolling I could find: touch point movements are remapped to clicks on the up/down arrows on the vertical scrolling bar.
MY QUESTION: Is there (could there be) another 'control' in LO/OO Writer which would allow smoother (pixelwise) scrolling of the displayed content?
Thank you very much in advance for your answers! (Please only answers referring to LO/OO Writer.)
Clicking and dragging the scrollbar allows higher granularity than the up/down arrows. The scroll amount adjusts if the document is zoomed in.
On the downside, using the scrollbar is much more difficult than a simple click on the arrows. There is a discussion at https://autohotkey.com/board/topic/51041-click-drag-scrollbars/.
If it is a touch screen, perhaps you could require the user to touch the scrollbar, so the touch location would give the vertical position of the scrollbar. Then use MouseClickDrag starting from that position.
I'm trying to resize a drawn quadCurve by dragging one of its 3 control points so the curve can fit. What is the best approach to do this? letting you know that I'm using an imageView for drawing. Not using drawRect.
I know that I should detect if the touch is on the control points which is pretty easy but I don't know what to do after in my touchMoved and touchEnded methods.
Several things:
I would not use an image view for this. This is the kind of problem that drawRect: is for.
Don't use touchesMoved. Use a UIPanGestureRecognizer on the control points.
Make the control points subviews so you can attach gesture recognizers to them.
To work well, the control points typically need to have a pretty large hit area (larger than they are visually). You can do this pretty easily by making the control point views larger than what they draw (so if they're drawn as a 13 point circle, you put that in the middle of a 23 point view).
For an example of code that does all this see CurvyTextView.m. It doesn't do the last point (the control point views are too small to use well on a real device). Ignore all the text drawing code. You just care about updateControlPoints, addControlPoint:color:, initWithFrame:, pan:, and drawPath.
I am trying to created a vertical menu (on the left side of the screen) which I can display and hide using a gesture recognizer.
I have found a post similar to this which helped slightly, but all it did was rotate the UIToolBar to a vertical position without changing the width or position.
If anyone has succesfully created something similar to this and is willing to help I would greatly appreciate it!
Also, if anyone can point me in the right direction possibly to some sample code I would like that as well.
You could do this with a UIToolBar by applying a 90 degree rotation transform, and then having all your icons rotated 90 degrees to match - you can change the width and position simply by adjusting the UIToolBar frame. However, you will need to create your own toolbar to do this rather than using the built-in one you get with a navigation controller.
Another option is simply to roll it yourself: this will allow you more customisation, so is perhaps the better option. There are a number of third-party implementations of varying types, some based off the current Facebook App side-bar, a good place to start looking is http://cocoacontrols.com - they are of varying quality.
On the other hand, it wouldn't be too difficult to roll your own, so that's a good option to consider.
As you can probably tell from my last few questions, I am working on a screen that allows users to edit labels. Pages and all the other lovely apps have glorious resizing handles to show what label is currently being edited.
I am trying to get some feedback on the best way to do this. Is it possible to add an 'dot' image to the centre of all the edges of the label? Is it possible to change the background colour only in sections of a label?
Or should I add an image on top of the label and disable it? The most important feature is for only the uilabel to respond to touches. If I overlay an image, I want it to ignore the touch and hand it off to the label.
Any feedback appreciated!
Cheers Guys!
You will find as many opinions on this as there are programmers. There is not built-in decoration for a view that shows the dot in the middle of each side. But you can add that easily enough. One way is instantiate four instances of an image with the dot and add them as subviews of the view you are decorating. you can then set the center of each dot on the center of each edge in the parent view. As long as clipping is turned off in the parent view, these will show up (if they are not hidden) even if they extend outside the frame of the parent view.
I don't understand what you want to accomplish by changing the background color in sections of the label view, but I this probably has some moderate complexity to it.
You can also to this with core graphics. I'll stop there, though. There are literally many ways to do what you are trying to do.
Is it possible to set up UISwitches and UISliders vertically rather than horizontally?
As like Caleb said, it may violate the guideline.But am not sure about that.
If you really want to change the here is a sample ,
urSlider.transform=CGAffineTransformRotate(urSlider.transform,270.0/180*M_PI);
The above code will change the slider position from horizontal to vertical.Same like this you can do for UISwitch.
I am looking to do the same. From the Apple Developer Site iOS UI Element Usage Guidelines:
Slider
Appearance and Behavior
A slider consists of a track and a thumb (a circular control that the user can slide) and optional images that convey the meaning of the right and left values. When people drag the thumb along the slider, the value or process is updated continuously and is displayed in the track.
Guidelines
Use a slider to give users fine-grained control over values they can choose or the operation of the current process.
If appropriate, customize the appearance of a slider. For example, you can do any of the following:
Display a slider either horizontally or vertically.
Set the width of a slider to fit in with the UI of your app.
Define the appearance of the thumb, so that users can see at a glance whether the slider is active.
Supply images to appear at both ends of the slider to help users understand what the slider does.Typically, these custom images correspond to the minimum and maximum values of the value range that the slider controls. A slider that controls font size, for example, could display a very small character at the minimum end and a very large character at the maximum end.
Define a different appearance for the track, depending on which side of the thumb it is on and which state the control is in.
There do not seem to be prohibitions against changing switches, steppers, and segmented controls. However, permission does not appear to be explicitly granted for those controls.
While it's not a good idea to modify the standard iOS controls like UISlider or UISwitch, it's very easy to write your own custom UIControl. See Mike Ash's "Diagonal Slider" post
I just tried to use UISlider vertically with a CGAffineTransformation (Set to 90 degrees).. But it doesn't work. It works until 45 degrees. So my guess is UISlider is not made to detect vertical finger slide movement.
To make a slider Vertically try this
UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(200, 270, 160, 30)];
CGAffineTransform sliderRotation = CGAffineTransformIdentity;
sliderRotation = CGAffineTransformRotate(sliderRotation,-(M_PI / 2));
slider.transform = sliderRotation;
[self.view addSubview:slider];
Those controls don't have a built-in vertical orientation option. It's possible that you could rotate them simply by applying an appropriate transform, but it's probably not a good plan if you hope to distribute your app through the app store. See section 10.3 of the App Store Review Guidelines, which tells you that you risk rejection for misusing standard controls.