UITableView transform property not working in iOS 8 - ios

I have UITableView in my app,
I am using transform property of UITableView
When i write this line in iOS 7
tblFilter.transform=CGAffineTransformMakeRotation(-M_PI_2);
it works properly but when i run same project in iOS 8 it doesn't work it's strange error :(
How can i solve this ??
please help and thanks in advance.

You should try this in viewWillAppear, UI related things are ready to be displayed in this event so it will work.

You should use scale, not rotation, so that the scroll bar still works:
tblFilter.transform = CGAffineTransformMakeScale(1, -1)

Related

Xcode 8.1 UI Testing twoFingerTap() fails on Google Maps view

Since upgrading to Xcode 8.1 my UI tests that use twoFingerTap() to zoom out on a Google Maps GMSMapView have been failing with
Assertion Failure: Element.swift:135: UI Testing Failure - Unable to find unoccluded area to perform event.
The message preceding that is
Recompute visible frame by excluding frames of occluding elements StatusBar and "the view's identifier"
Anyone have any idea what I should do about that? Tried tapWithNumberOfTaps(1, numberOfTouches: 2) and same thing happens.
NB. The problem is definitely with multi-finger taps only -- doubleTap() and pinchWithScale(2.0, velocity: 1.0) continue to work fine under Xcode 8.1. pinchWithScale(0.5, velocity: -1.0) continues to move origin instead of zooming, which is what it did to GMSMapView in Xcode 7 as well.
I am not sure if you're drawing your UI, or using storyboards. Nevertheless, it doesn't appear that you have the elements drawn to the view properly. Perhaps using constraints you can secure the element to your view.
Ive just upgraded to Xcode9 (beta) and this issue appears to be resolved
Not sure if you already solve your case but It will help if you put Google Map inside another view and then set it's accessibility in storyboard (make sure Accessibility's "Enabled" and "User Interaction Enabled" is checked)
Then you can find it inside otherElements and tap or doubleFingerTap on it.

Xcode Swift - iOS 10 & iOS 9 Text size problems

I've got a few buttons with text inside. If i run the app on an iOS 10 device, it works and shows the text fine. But running the app on iOS 9 the text inside the button is like "squashed" or "compressed"(the text on version 9 is missing the top and bottom part of the text). I'm not sure why this is happening, I've tried messing around with the hugging and compression settings on the UI Builder, but this hasn't really fixed the problem.
Not sure why it works on 10 but not on 9....The image above shows what the text looks like on iOS 9 ONLY!
I'm just seeing if this is happening with anyone else? or if anyone knows how to solve this problem?
I appreciate any help given! Thanks in advance!
You have to use "adjustsFontSizeToFitWidth" property of titleLabel of your button
Example:
myButton.titleLabel.adjustsFontSizeToFitWidth = YES;
There are a few possibilities:
The height of the button during runtime could be wrong. Try setting a border to the button, run and observe the button outline to see if the height is correct.
myButton.layer.borderColor = UIColor.black.cgColor
myButton.layer.borderWidth = 1
If the height is wrong, it means the constraints could be incorrectly set up.
Another possibility might be contentEdgeInsets, titleEdgeInsets properties of the button having larger than intended top and bottom values.

iOS Swift orientation change animation missing

I'm writing an app in Swift 2.0. The app works fine in every aspect, beside one.
When I tilt the screen of both device and emulator the orientation change animation is missing. Instead of a smooth rotation I get a clunky orientation change. Portrait -> Landscape. Nothing in between.
Giving the fact that the animation should be the default, I would like to know if anybody knows the possible solution to this problem. I searched everywhere and apparently nobody has this problem, instead people try to disable that animation!
After some tests and thanks to Zell.B, I moved the code from didFinishLaunchWithOptions to applicationDidBecomeActive and everything works fine.
Deleting the applicationDidFinishLaunching method from the app delegate class can also cause the lack of animation problem. Adding it back in can fix it.

UIDatePicker not displaying properly in iOS 9

I am NOT using auto layouts and this is how the UIDatePicker is appearing in my app on iOS 9. The picker is looking flawless in iOS 8 but the problem is only with iOS 9. Any idea how to resolve this.. (P.S using auto layouts in not a solution at the moment for me.)
In the viewDidLoad() method, change a property of the date picker, for example the mode. Note that, You don't have to leave it changed, you can set it to anything and then change it back to what you actually want.
I am sure, this solution is helps you.

UISearchBar's edit animation gone in iOS8

I am implementing a custom search on a table for iOS. I noticed that the slide animation became a little jumpy for iOS 8, where it was smooth in iOS 7. Did anyone notice the same problem and got a fix for it?
Here's two gifs showing exactly what I mean:
This is iOS 7:
This is the same search bar in iOS 8:
Notice how the search icon and "Search" string jumps about 100 points to the left/right, then slide to its final position in iOS 8, while it is a linear interpolation in iOS 7.
After some experimentation, I've found that this seems to be caused by setShowsCancelButton:animated: method. Removing it fixed animation.
Instead of putting the above method in searchBarShouldBeginEditing:, put it in searchBarDidBeginEditing.
To dismiss, put the above method in searchBarShouldEndEditing: instead of searchBarDidEndEditing.

Resources