문제

I have two NSMatrix radio controls in different places in my app. I am developing on 10.8, using the 10.8 SDK and targeting 10.7. The matrixes work perfectly on my development computer, but when I test on a Mac running 10.7, neither matrix appears. I've checked the auto-layout struts, I've made sure they aren't set to hidden. They're just not appearing at all.

도움이 되었습니까?

해결책

I was having a similar problem, but in my UI from three NSMatrix radio controls in different places (different views in different xib's) two were displayed correctly on 10.7, one not. I tried different things, in the end I deleted this NSMatrix and placed it again. I unchecked both "Automatically Resizes Cells" and "Auto Calculates Cell Size" in the size inspector. And very important: I checked all auto layout constraints in the whole view and made sure that all objects have vertical/horizontal spacing (between each other) or leading/trailing space to superview constraints, the top object a top space to superview and the bottom object a bottom space to superview constraint. Et voila, it's showing up finally also on 10.7!

Hope you can solve your problem in a similar way. Looks like NSMatrix is acting very diva-like on 10.7 with auto layout!

다른 팁

Try to disable auto layout completely. Uncheck "Use Auto Layout" in the file inspector of the relevant nib. It did the trick for me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top