indicatorYOffset inititialized to 0.0f #6

Merged
merged 1 commit into from Mar 20, 2013

Conversation

Projects
None yet
2 participants
@dmitric
Contributor

dmitric commented Mar 20, 2013

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.

@HeshamMegid

This comment has been minimized.

Show comment Hide comment
@HeshamMegid

HeshamMegid Mar 20, 2013

Owner

Strange indeed.

Merged, thanks! 😃

Owner

HeshamMegid commented Mar 20, 2013

Strange indeed.

Merged, thanks! 😃

HeshamMegid added a commit that referenced this pull request Mar 20, 2013

Merge pull request #6 from dmitric/master
indicatorYOffset inititialized to 0.0f

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

@dmitric

This comment has been minimized.

Show comment Hide comment
@dmitric

dmitric Mar 20, 2013

Contributor

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!

Contributor

dmitric commented 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