i'm experiencing some issues with AutoLayout. Building for 10.8 with Xcode 4.6.2 none of the constraints i setup work for OSX 10.7. Are there any known issues around this?
Thanks!
I got this problem too, so I wrote a custom split view based on constraints. See my repo for code. https://github.com/silvansky/TwinPanelView
I personally gave up trying to use auto layout with split views. The manual layout works the best, in my experience, and is actually not much more complicated at all.
In particular, take a look at this answer: https://stackoverflow.com/a/843870/2308693
It's brilliant, and it gives you full control of everything (so I agree fully with the first comment on that answer).
Related
Currently I'm doing some GLSL-stuff and to my surprise I cannot find a reasonable IDE for this (MacOS). Nothing to fancy, but just a way to change the code and see the results. I know of the Shadertoy-website, but I'm more interested in an offline solution.
So I came across the built-in OpenGL Shader Builder. According to Wikipedia, this is deprecated and superseded by GLSLEditorSample, which should still be available as an example project for XCode (of which I have version 7.3.1 installed). However, I basically cannot find anything about this, online nor on my computer. Therefor my question: Is this still relevant? If so, where is it located?
PS: if you know of any other GLSL IDEs, I'm open to that as well
Here they explain how to setup OpenGL on a MacOS on Xcode:
https://www.youtube.com/watch?v=Tz0dq2krCW8&list=PLRtjMdoYXLf6zUMDJVRZYV-6g6n62vet8
I'm trying to build a rather simple GUI using xCode/Cocoa. I've designed it in Interface Builder using a storyboard and set the corresponding constraints.
I'm using xCode 7.3.1 on 10.11.6 (El Capitan) ... the deployment target is set to 10.9. On my machine, everything looks fine:
When I run the application on another machine 10.10.5 (Yosemite), it looks like this:
I've tried lots of different combinations of vertical and horizontal stack views to organize the elements.. as well as setting some dummy constraints. The result on the Yosemite machine will change slightly, but is never correct/the same.
UPDATE: I've found out that if I don't use neither vertical nor horizontal stack views, the situation gets a lot better. Still doesn't really explain why it can look different on 2 machines
How is this possible? I thought the .storyboard file is fixed at compile-time?
Any hints you can give me will be greatly appreciated.
I was able to solve this (more of a workaround, actually) by removing all stack views from the storyboard.
Also, I took a closer look at the "Automatic preferred width mode" warning:
Solved those by following the steps described here:
https://stackoverflow.com/a/27867875/649700
I'm still puzzled as to how this is even possible. If stack views are not fully supported or don't behave the same way earlier OS versions, there should at least be warning when I choose "deployment target 10.9"! Better yet, Xcode should disable the stack views altogether if that's the case.
Hope this helps someone out there.
I'm interested in learning OpenGL, so I started reading the book 3D programming for iPhone by O'Reilly. And guess what, I got stuck at the first exercise.
Even though I followed the guidelines, my Xcode application won't allow me to use the _OES suffix in the functions glGenFramebuffers and glGenRenderbuffers.
I did some research, and it appears that this is related to the 2.0 version.
However, I did in fact add both:
#import <OpenGLES/Es1/gl.h>
#import <OpenGLES/ES2/glext.h>
and the added OpenGL framework also includes the header files for both ES 1 and 2.
So I did some more research, and downloaded the project that I found in this thread:
Example from Chapter 1 of iphone 3D programming book not drawing to screen.
When I run it in my Xcode, it works.
I don't see any difference between our projects, so why does the _OES suffix in fact work for him and not for me while using the same version of Xcode? I even copy - pasted his code into my own project, but my Xcode project won't allow it.
Well, I don't get bugs either by just leaving out the _OES suffix, but I only get a black screen when running the app so it must mean something is wrong.
As a second problem is also that I get a lot of linker errors when I try to run the app on the iPhone simulator; I don't get these errors when I try it on my iPad. And I don't get these linker errors on my simulator when I use the downloaded project; it works for both the simulator and my iPad.
I'm terribly confused, has someone an idea what could be the cause of all this?
I'd like to continue, but I'm stuck :-) Thank you very much for your attention and help!
I’m sure most of you are familiar with the UISwitch on iOS.
Is their any existing project trying to implement something like a UISwitch for macOS and AppKit?
If not, where would one start to make one? I see them frequently and can think of so many uses.
I think you should use NSCheckBox since it is the equivalent on a computer where you use a mouse and not your finger.
For anyone that comes across this question in the future, I have developed a UISwitch for Mac (MacToggle) Swift 3 & AutoLayout
https://github.com/RichAppz/MacToggle
It's a replica of the iOS UISwitch and fully customisable.
Enjoy
I've used the Mondo Switch that's part of the Cocoa Mondo Kit. It works pretty well.
I recently extended Peter Hosey's PRHOnOffButton to add iOS-like background colors and labels. Since mine is derived, it may or may not have the same caveat described above by Peter.
You could use Peter Hosey’s PRHOnOffButton.
ITSwitch requires no images, integrates with Interface Builder and has lovely (modern) animations:
https://github.com/iluuu1994/ITSwitch
Recommended.
starting with macOS 10.15 'Catalina' there is a native control for that called NSSwitch: https://developer.apple.com/documentation/appkit/nsswitch?language=objc
Apparently libncurses...dylib is broken OS X 10.6.3 relative to Mutt, and perhaps other applications, that use ncurses, although it works in 10.6 (as I can attest) and reportedly it works in 10.6.2.
Does anyone know if this is a bug or a feature in the view of Apple? If a feature, is there a workaround for people who want to upgrade 10.6..., but also want to use, for example, Mutt?
Thanks
As your post is pretty sparse in details, I guess you're talking about the bug in ncurses that breaks the way arrows works? (And may quit programs when you try to use the arrows, as a side effect)
I described it here: http://www.uponmyshoulder.com/blog/2010/os-x-10-6-3-broke-ncurses/
If we're talking about the same thing, I honestly think this is a bug. It doesn't match the documentation for ncurses, and actually makes no sense.
I submitted a bug report more than two weeks ago, without any answer from Apple so far.
A workaround (as suggested by Jonathan Groll) is to copy /usr/lib/libncurses.5.4.dylib and /usr/lib/libncurses.5.dylib from a 10.6.2 system. I don't really know what to think about such a libraries switch, as it might trigger other problems, but it does indeed fix this bug.
I've been told by Apple that my bug (ID #7812788) is a known issue currently being investigated by engineering, and has been filled as a duplicate of bug #7812932.
I'll keep you updated. :)