How to make gallary view at bottom in blackberry - blackberry

The nexGTv – Mobile TV for touch phone app has a scrolling horizontal field manager that I want to create in my own app.
It has image buttons at the bottom of the screen, horizontally. These images slide to the right and to left. The initial focus is the horizonal center image, then each image has 10 pixels of padding to the next image. What should i use for this?

I can understand your question, but i can not give you related code but i can tell you the logic behind this. To do this you first set a image at center and set bottom padding 10 pixel then fill images left side and right side. You have to do this in paint method. If you are a Blackberry Developer then you can understand it and try to do it. All the work perform in paint method, by using loops you can do this. This work con not be done by Picture-Scroll-Field because you want middle image with extra padding.

Related

Floating content of UIScrollView when smaller

I'm trying to make kind of collage, so I want to resize image and drag it to any position of scroll view. Currently I can drag image only when it is bigger than scroll view. But when it is smaller than it sticks to top left corner. Yes, I can use scrollViewDidZoom to move image to center for example, but it is not what I'm looking for. For example I want to allow users to drag an image to any position of the scroll view, like this
To do that I just merge big empty image with my image I want to move. Looks like a bad solution, but it working as I wanted

Free Scrolling in Xcode 8.3.3

I want to create a page with a big image as background and buttons that users can interact with.
So imagine I put a big image such as a piece of map into the screen, but I only show a corner of the map in the display. So if a user wants to see other parts of the map, they have to "scroll" and navigate to wherever they want.
Meanwhile I also want to put a button they can tap on, and that button should lead to a php webpage (in-app, not opening in safari or else) or information page about sites and buildings in this location.
I am a rookie and I haven't have any code written down yet. I am thinking about using UIScrollView and UIButton, but am I on the right direction? Any advice?
Thanks in advance!
First you need a way to pinch zoom the image. In this mode, you can drag the image in any direction that you want. A common method can be found here. A scroll view can only scroll horizontally or vertically but with that image zooming, each image can be zoomed in and then dragged to any direction you want. You can have a scroll view with only one image.
After you have the image zooming ready, all you need to do is to create a subview on your screen to cover part of the image view or scroll view, whatever you used.

UIButton with background image and title using auto layout

I currently face a problem when using UIButton. I have the background image designed by others like this:
background image
and I need to place the title for the button right after the white vertical bar in the background image. I tried to set left edge for the content but since I used auto layout, the frame will be different with different screen size(3.5", 4.7"...).
Is there a way to put text in the position related to background I want with auto layout.
Thanks
I personally would split the left side of the background image from the right side. This way you can have two UIButtons next to each other with horizontal space constraint of 0. The right side of the button will have to be placed inside a UIImageView so you can set the image as a property of the view rather that the button's background. You don't have to do this of course, but I prefer this solution as it is easier to manage across different screen sizes.
Here is a visual representation of what I explained above:
Separated Views for Single UIButton
You will then need to route the touch events of both buttons to run the same method or function, just so that both the right side and the left are clickable.
Note: I'm not sure exactly what you had in mind for the highlighting of the button, but this will have to be tested and adapted to get the desired effect.

Guidance - Custom UICollectionView animation

I am looking for guidance with how to approach the following animation scenario.
I have UICollectionView with a custom circular UICollectionViewLayout subclassed layout. There are (circular) images around the perimeter of the circle and a 50% larger (circular) image in the center of the circle.
When the user taps one of the perimeter images, I want the tapped on image to move toward the center (becoming 50% bigger) and sort of "connect with" the center image. I then want the two images to float to the top of the view. (The bottom portion of the view will then be a context of things related to the two joined images).
If this makes sense to anyone, I'd really appreciate a starting point of some kind.
By the way, I'm an old developer but new to iOS and developing in Swift (but can read Objective-C).
Thanks!
I solved this using a visual trick. Of course, I'm sure there's a better way.
When one of the perimeter circles is tapped, I transition to a view controller that immediately creates a duplicate of the center circle and the tapped circle in their former locations, making it appear that the other elements disappeared.
I then simultaneously animate the tapped circle to the center and the center image to the top of the view. I enlarge the tapped circle briefly and then animate it to the top of the view next to the center circle restoring the tapped image's original size.
Not elegant but it works.

Creating an animation such as iOS 8 Weather App

I want to create a view in which I like to have animation such as the one present in iOS 8 Weather app.
I try to explain more what I have done. If anything is incorrect please guide me.
In the top I put a label for the temperature. (The big one)
Below that label, I put another label to show some text. In the Weather app, there is the horizontal scrollview showing the hourly forecast.
Next is the Table view.
What I want to achieve is that when I start scrolling, the first label disappear smoothly and the second one go to top of the screen and the TableView stretches to show more content.
When I scroll back to the top, I want the whole process to revert.
What is the best way to do this?
I've recently re-created the iOS8 Weather app's scrolling effect for an app I'm creating.
The complete code is too long to post here but for anyone who's interested, I've put it on GitHub. You can download and run the project to see how it looks. Improvements to the code are welcome:
UIScrollView with masked content.
It works like this:
You have one scrollview (the size of the screen), which contains a subview (the mask) which in turn has a subview (the content). We also add a large label to the top of the screen (in the Weather app, this displays the temperature).
Then you use the scrollViewDidScroll delegate method to keep the mask fixed to the screen as the user scrolls. You also use this method to stretch the mask upwards at first.
Fixing the mask to the screen means that the mask's subviews (our content) also becomes fixed. But we want it to scroll, so we do the opposite to the content of what we did to the mask (again, using scrollViewDidScroll).
We need the mask to actually behave as a mask, so we set clipsToBounds = YES on the mask.
Finally, we use the scrollview's offset during scroll to move and fade the big label at the top of the screen.
To make it behave exactly like the iOS8 Weather app, we need to also do the following:
Cancel any scroll touches that happen above the mask, i.e. over the large temperature display.
Ensure that the initial scroll that moves the temperature display is completed programatically if the user doesn't complete it.
Add a sideways-scrolling subview which is anchored to the top of the mask.
I haven't done these yet, though.

Resources