I am creating an app for my kid:
The image has 5 section, each in a different color. Each section has a black box on each side of the section.
What I want to do is when touching a black box in a section I want that section to vertical flip around and in the process of flipping I want the whole screen to follow flipping vertical to a new screen.
Ex) I press the left black box in green section. The green sections starts to vertical flip around (to the left or counter-clockwise) its axis in the middle of the section. And when it has flipped/turned some 10 degrees I want the rest of the sections to follow and when all sections has flipped a new all green page is shown.
I hope I made it clear what I want. Is this possible? How can it be done in Swift?
I have seen the vertical page flipper but I want a bit more stylish:). I have seen other samples with flipping an image, but not this two-part flipping.
Thanks to all clever people,
Micael
Related
I need to display bar-chart diagram.
The main issue I've not found yet is how to display bars with sub-bars.
So the first bar consists of green bar (with 5 points for y) at bottom and yellow bar (with 3 points for y).
And the second bar consists of pink bar at bottom (with 3 points for y)
So my bars are not stacked. - I can have even no bars for next x, but I can have 3 sub-bars in one bar in different order.
Generally the following image shows what bars do I need.
Generally the following image shows what bars do I need.
Use a different bar plot for each fill pattern. Set barBasesVary to YES on each plot so you can control the ends of bars individually. The plot will query the datasource for three values for each bar: the location (the horizontal position for vertical bars), the tip (the top) value, and the base (the bottom) value. The "Vertical Bar Chart" demo in the Plot Gallery example app shows a simple example of this technique.
When I zoom in on a series in highcharts, I've noticed that the first visible point of the series is where it starts to draw. This means that if the only point in the visible zoomed area is in the middle, then the line for that series only starts to draw in the middle of the window. Is there a way to make Highcharts render the previous value so that it does not "cut off" the previous values of the graph?
Before, zoomed out:
After, zoomed in (problem):
Desired:
I have tried setting cropThreshold and connectNulls (just in case) among other tweaks with no luck. Any suggestions?
I have a custom table view and want it to look like this...
(source: pulsewraps.co.uk)
The image is loaded via async and the two lines come from two different arrays. I can get all the data in fine I just don't know how to lay it out.
I want:
the black gradient to overlay the image
the two lines of text to be within the black gradient box
the image to fill the table row to cover it and keep it's aspect ratio
the black gradient box to be pinned/constrained to the bottom of the image so that is either line of text is larger than two lines it covers more of the image and doesn't drop below it.
I fill the table data in a loop according to the number of records in my array which is populated by json.
I have managed to do the layout in android but can't get my head around ios.
Any help much appreciated.
If you're using autolayout, you'll want to constrain the labels to the bottom and to each other. Then put the gradient view behind the labels and constrain the top of the gradient to the top of the top label.
You'll have to handle drawing the gradient yourself, either use an image in an image view and set it to scale to fill, or subclass UIView and add a little bit of code to drawRect: The first is probably easier, the second will produce a more uniform gradient if it has to be scaled.
I have chart showing time data. I have two points back in time which I need to "mark" in the chart.
I currently indicate these two by plotlines, but would like to show bar, with let's say green and blue bars showing the timespans (for example -13days from now with blue and -90days -> -13days with red).
I would use plotBands, but I can't specify their height and do not want to have them all over the chart.
Is there some way? I saw something about translating pixels and drawing rectangle, but wasn't able to make it work. Also - I zoom a lot in this chart.
You can use Renderer and add custom shape. In other cases, please attach mockup of your goal.
http://api.highcharts.com/highstock#Renderer
Wondering if there is an easy way to remove a rectangular slice across the entire width of an image using Gimp, and have the resulting hole closed up automatically. I hope that makes sense. If I select a slice across an image and do "cut", it leaves a blank "hole" there. I want the new top and bottom of the image to join and fill that hole, reducing the image height by the amount sliced out.
Any easy way to do this?
Here is a method that is quick and often does what you want:
Cut out the middle, leaving a transparent "hole".
Click anywhere to remove the selection (so the hole is not selected).
Click Image > Zealous crop .
This is going to remove the middle part. However, if you also have transparency in other parts of the image (like around the edges) it's going to remove that transparency too.
I believe you're asking to do something like cut out the middle of a page, leaving the header and footer and have the blank space removed with the cut action, effectively joining the header and footer together.
To my knowledge, I don't believe so. Even if you cut, or delete, that space is still part of the image even without content.
But, you would be able to highlight the top or bottom (or left or right) of the remaining space and drag it to align with the other side. It's not ideal for repetitive tasks, but should get you through if you only have to do it a few times.
Install Python and the Python Imaging Library. Back in GIMP, select and cut the full-width areas you don't want to transparent, and export the image to test.png. Then use this Python code (works only if complete lines are transparent; will not work properly if there are 100%-transparent pixels anywhere other than on a full-width row)—
from PIL import Image
i = Image.open("test.png")
b = i.tobytes()
b2 = ''.join(b[n:n+4] for n in xrange(0,len(b),4) if ord(b[n+3]))
newHeight = len(b2)/i.width/4
i2 = Image.frombytes('RGBA',(i.width,newHeight),b2)
i2.save("test.png")
Then re-load test.png and verify that the areas you cut have gone.
In gimp 2.8.1 you can easily create a new image from a selection. So if you select a rectangular than do a copy (Ctrl-C) and a past in a new image
Edit -> Paste as -> new image (or Ctrl-Shift-V).