UIActivityIndicatorViewStyleWhiteLarge not appearing in iphone 4 - iphone

I tried to create an activity indicator using the following code
CGRect frame = CGRectMake(160, 160.0,40.0,40.0);
progressIndicator = [[[UIActivityIndicatorView alloc] initWithFrame:frame]autorelease];
[progressIndicator startAnimating];
progressIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
progressIndicator.hidesWhenStopped=YES;
[progressIndicator sizeToFit];
[self.view addSubview:progressIndicator];
This code is working correctly in all devices except iphone 4(ie. indicator not showing in iphone 4). For that reason, i was forced to change the UIActivityIndicatorViewStyleWhiteLarge to UIActivityIndicatorViewStyleGray so that activity indicator is shown in all devices. Can anyone explain me why this happens?

The large white indicator has no drop shadow on ios 4 like it does on ios 3. I'm not sure why apple removed the shadow, but the indicator is there. You just can't see it on a white background anymore. Use the grey one, or put a background behind it.

I opened a ticket against this a week after iOS 4 came out and have yet to receive even an acknowledgment of the issue. It works in iOS < 4, broken in iOS >= 4. Doubt it'll be fixed any time soon.

hi
i have the same problem as yours
however, actually the indicator is shown.
It may seem to be a hardware problem.
I guess that the retina display can not display the white display properly with white background.
because when the indicator was displayed on the black background, i could check that it worked.
I hope it may help you

Related

iOS 10 GMSMapView showing my location icon with white background

This issue didn't show up in previous iOS versions. But in iOS 10 beta, the user location icon is displayed wrong. The blue dot is showing its frame in a different background instead of clearColor.
Is this an issue with iOS10? Any workaround to set the background color of the blue icon ?
I know we can put a custom icon by setting the blue dot to NO and:
GMSMarker *pointMarker = [GMSMarker markerWithPosition:currentPosition];
pointMarker.icon = [UIImage imageNamed:#"YourImage"];
pointMarker.map = _map;
IS there any other way to set the background of user location to clear color ?
This sometimes happen in the Simulator, I've seen it on older iOS versions.
If this happens on the device then it's a bug.

UIImageView is shifting down when viewed on 4 inch iphone

I am trying to figure out what settings for the UIImageView below will work with all device sizes.
I'm getting no luck with every combination I've tried.
Here's the .xib:
When I run this on a 4" the image is shifted down much lower from the top label and the buttons stay put.
I have the top label set to Top, tried Aspect Fit/Fill for it as well, didn't change anything. Seems to be an issue with the UIImageView. Also saw someone mention try clip subviews, have that selected, still can't keep it the same size and orientation when going back and forth from 3.5" to 4" iphone on device and simulator.
Hope this helps, in your case you should keep it to the default setting, no change required..
First if turn off the Autolayout setting from XIB.
Now visit my answer here.

How to get this background strip in IOS 6?

I have used this background in older version, after updated to iOS 6.0 I am not able to find anywhere in IB. I stack overflowed and used this
self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
Still it is giving white color, What should I do now? Do I need to set image for this?
This function groupTableViewBackgroundColor deprecated on iOS 6. Please set color or image in Background mode
please see the SO answer

No button events in iphone 5 simulator

When I test my app running in the iPhone 6 simulator everything works as expected. If I however test it in the iPhone 5 or iPhone 5.1 simulators, I can't seem to get button events fired. Im using Xcode 4.5.2, not using storyboards and I have made tests with simple buttons with actions like:
- (IBAction)test:(id)sender {
NSLog(#"YEES");
}
And the actions is connected using drag and drop in the interface builder. I just can't seem to get it fired.. Do you have any idea about what could be the problem?
Update Jan 18:
If I do a "normal" click on a button in the iPhone 5/5.1 simulator nothing happens. If I do a bit "slow" click on a button the button will be "pressed"/selected. If I do a "really slow" click, like holding the button down for 3 seconds I get the button click event! How is this possible??
I found a solution for my case - i added UITapGestureRecognizer to the container UIView, and it intercepts events before UIButtons, and need some time to fail before buttons can handle tap... But it strange that in iOS 6 all works fine
To avoid this we can simply call:
[tapRecognizer setCancelsTouchesInView:NO];
I really suspect this could be the issue of view overlapping.
Please color your views that you are using on the view controllers and check whether any of your view is overlapping your button or not
I had a similar issue with an iPhone 5s simulator. Through trial and error I realized that the button's height in the simulator was 0 or otherwise a small number... The first clue to that was that when I changed its background color - the background did not show in the simulator (on larger simulators, like 6 or 6 plus, it showed as a thin line instead of full height). Then when I added a height constraint, it started accepting click events. That helped me identify the issue, but it was not the solution I was looking for. Initially I laid the button out without size constraints, so it's actual size should have been determined by it's intrinsic size. So instead of the height constraint, I changed the vertical compression resistance of the button to "required". That fixed the issue.

colorWithPatternImage creates black lines across view

Since updating to the latest XCode (although it may be iOS 5.1 related) I have noticed my iPhone now shows black horizontal lines between repetitions of my background image. This does not show on the simulator (normal or retina). Note my iPhone is retina.
I have tried adding a retina version of the background image but this shows the same issue (except the horizontal lines are twice as close to each other due to the resolution change). Another interesting thing is that the lines are only horizontal despite the background image being square, not sure how relevant this is?
Here is the code
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"light_alu.png"]];
I also tried the code listed in this similar question to no avail.
Here is a screenshot of my game with the horizontal black lines (notice there is one right at the very top beneath the toolbar)
What is causing this to happen?
I solved the issue using the answer here. Essentially optimised PNGs cause the issue and re-saving the image without any fancy compression will fix it.