I use UISlider for video player to track and change the location of the playback.
It seems that when ever I change the slider.value from code, the background line of the slider disappears.
It changes from this:
to this:
(I added the gray background color)
What can cause this issue?
Solved.
As trojanfoe suggested, I looked at this question:
iOS - iPhone : UISlider track image disappearing randomly
In simple words: I used [UISlider setValue:animated:] and made sure I don't get NaN, which was the real problem.
Related
iOS 8.0.2 and iPhone plus when I set UIButton backgroundImage in XIB,UIButton become bigger though this button have layout with height and weight after running
UIButton in xcode:
and layout :
but running in iPhone plus iOS8.0.2:
but in other iPhone like 5s,6 this button is ok!!!
the backgroundimage like this :
i have setup (https://github.com/usamaiqbal83/TestingProject) a repo for your case, it is not happening for me you can compare your setup with mine . i checked it on simulator
or if i am not able to understand your scenario clearly, kindly setup a repo i will gladly take a look.
when I set the Image like this:
it is working .
I do not what has happen, but just it is.
any body know why it is?
So I have searched for hours on a solution to this and have attempted using filters with no success. I was wondering how can I create a flash effect using the front face camera but then modify the image so it looks like it added the flash as if it was using the back camera? I know a few apps such as snapchat have done this but I could not find a tutorial on how to achieve it. I have tried adjusting brightness, gamma & exposure with no success.
NOTE: I know there is no flash on a front camera for iOS.
EDIT: I am thinking it is possible by setting the screen brightness to the max, animating then going back to the previous brightness.
On an iOS device you take a screenshot when you press home + lock and the screen flashes white. Do you mean this effect? If so, try this:
Add a UIView with a white background color to your view hierarchy such that it covers the whole screen. Then, start an animation that fades the opacity of this view to zero. On completion, remove the view from its superview:
[UIView animateWithDuration: 0.5
animations: ^{
whiteView.alpha = 0.0;
}
completion: ^(BOOL finished) {
[whiteView removeFromSuperview];
}
];
If you want the entire screen to flash, add the white view to the application's UIWindow and set the frame accordingly. All buttons work all the time, if you add the white view just in the moment before the animation starts and remove it on completion - except during the short flash
I was able to make this work by increasing the system brightness right before the photo was taken, then resetting the value back. This would allow such brightness to reflect against someones face when in a dark room. If anyone wants to see the code, let me know. It is in Swift.
I've got a strange UIImageView behaviour:
I've got a UIViewController with an embedded UIImageView and a close button. Very basic stuff, done a thousand times. I didn't use Auto Layout that much in the past, but another view controller in the same Storyboard has nearly the same config and doesn't appear as strange as this specific one.
In my Storyboard the Controller looks like that:
...and on the device it looks like that:
That image is 1024x768, so it should be filled to the bounds. Content mode in the image view is Aspect fill. When i dismiss the view, i can see that the upper part of the image view must be hidden at the top with some negative Y or something.
I need Auto Layout in this storyboard, because it's an iPhone + iPad App with both orientations.
Has someone hat a behaviour like that before?
Thank you!
Edit:
Here is the layout panel:
First, get rid of the alignment constraints, they are not needed if you're already anchoring your view to every side with a set distance.
Second, check the mode property of your UIImageView in the interface builder. If the image was not big enough and you had it set for "TOP" instead of, say, "aspect fill", you'd see something like this even though the view is actually covering the whole screen.
I'm sorry that I have to say this, but it was, as you certainly thought, my own fault.
The problem was that I made a photo with the iPad, and the iPad can be used in both orientations in this app. The photo was taken and was then used for an own view that allows the user to put annotations on the image.
The image gets then saved, and that was were the problem occured: I call
UIGraphicsBeginImageContextWithOptions(self.view.frame.size, NO, 0.0);
The landscape image was now taken into a portrait frame. After adjusting this and only allowing portrait mode, everything worked well.
Thanks anyways for your answers. And sorry for asking a question when the problem was another one and my own fault.
I'm using IcoMoon to create a custom font that I use to generate Icons. This however plays no role as the same phenomenon occurs using Helvetica.
Why do 2 things occur on titleLabel of a UIButton on iOS 7?
The right edge of the label is cut off (the button frame is much wider, but the label frame is getting cut off
there is a dark ring around the light gray image.
This looks absolutely horrible and it's basically unacceptable. We'll have to render graphics ourselves and localize images where appropriate.
I would be grateful for any info. The only thing that distinguishes these two checkmarks is that they have different colors set for titleColor
Try setBackgroundImage: instead of setImage:
I was trying to add a background image to UITextField through Storyboard, but discovered a strange bug. When I'm trying to change Stretching under the View section of the Attributes inspector, the background image in the textfield does not change at all. I have also tried to do this with .xib file, but got the same result. And also I got the same result in UIButtons.
Try it yourself. Put a textfield into a view controller and add a background image to it and set stretching to 0.5, 0.5, 0, 0 You should get nothing.
So, is it a real bug or I'm doing something wrong?