How to programmatically customize a polygonal frame view on iOS? [closed] - ios

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Is there any possible to customize a view which it's frame is a polygon(such as a triangle) instead of a regular rectangle? (not just "draw" a polygon shape with CG)
Thanks.

No, all views in iOS have a rectangular frame.

Related

ImageMagick separate objects on image with transparent background [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed yesterday.
Improve this question
How can I split the objects/blobs on an image with transparent background and save them as separate images with ImageMagick?

creating a simple vu meter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I just want to have my subject talk into the phone and display the volume on the screen.
Any recommendations for an approach?
Thanks.
You can check SFGaugeView :
SFGaugeView
A custom UIView with a gauge control (tachometer like control).
This one "Detects swipe gesture and sets the needle/level appropriately.", but with a bit of work you will be able to disable that.
You could use LARSBar :
LARSBar
A UISlider subclass mimicking the awesome EQ slider found on Twitter's #music app.
If you need more precise help, tell us what you tried, what is working and what isn't.
Do you need help to get the level input in the mic ? Help to draw the view ? Be more precise.
Please see https://github.com/ChiefPilot/F3BarGauge
From their description:
This control is intended to replicate/simulate the level indicator on an audio mixing board. These indicators are usually segmented/stacked LEDs, with several colors to indicate thresholds. This control replicates that look, using Quartz drawing primitives, and auto-adjusts to horizontal or vertical orientation. Additionally, the colors, number of bars, peak hold, and other items are easily customized.
Apple also has some sample code that can be used to get you started: avTouch

How to make all pixels in an image transparent except for one color? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have searched the web high and low and found some examples which lets you extract out one color and make it transparent for an image i.e. background color. This was done with methods like CGImageCreateWithMaskingColors. What I'm trying to do is the opposite though. I want to extract out all colors from an image except for one color. Is that possible, and how?

Changing shape of UIView in Xcode 5? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Is it possible to change the shape of the UIView from rectangular
to triangular in Xcode 5?
I imagine you mean interface builder? No. You can do it a few ways in code. Override drawInRect (preferred) OR create the view on photoshop (quick and dirty) and bring it as an image. Then set the background as clear and add the imageview to it.

Objective-C (IOS 6.1+): Draw Text in a shape or path [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I was wondering if there is an "easy" way to draw text in a shape or a view or a path so that the characters wrap if the text line is too long (even with fonts with different sizes).
Below just an picture to describe the idea...
How can i check that a particular character size goes beyond the shape border and therefore the characters should be wrapped?
Any help on this...highly appreciated... :-)
Thank you in advance.
There's no direct way to do this on iOS. (At least Apple doesn't provide a way).
You will have to do it yourself - create a CGPathRef of your shape. Then use CGPathGetPathBoundingBox and CGPathContainsPoint to determine where to wrap your text. You can find out the size required for a string using -[NSString sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:].

Resources