indicatorYOffset inititialized to 0.0f #6

merged 1 commit into from Mar 20, 2013


None yet

2 participants


I ran into a very strange case where if I used this control in an archived ipa sent over testflight, the indicatorYOffset when using HMSegmentedControlSelectionLocationUp would be below the frame where it was supposed to be. (Strangely enough it worked fine when attached and debugging with XCode)

photo 1

Once I set this to 0 by default I no longer had the issue. I'm assuming it has to do with the fact that inititalized floats may not have to be zero'd or perhaps because I used a xib. Either way, very strange.


Strange indeed.

Merged, thanks! 😃

@HeshamMegid HeshamMegid merged commit 8ccd054 into HeshamMegid:master Mar 20, 2013

I distinctly remember in my C programming course in second year a student arguing that all vars are initialized to 0s and the prof telling him that depending on your implementation of C, it can vary. I can't tell though because in debug mode it worked fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment