Zooming in CorePlot on Mac OS X - macos

I am using a CPTScatterPlot to plot some data in my Mac OS X app, and want to offer the ability to zoom in and out.
I can see that the iPhone version has the allowPinchScaling setting, but there doesn't seem to be a Mac equivalent. Before I manually implement anything, I thought I'd check to see if perhaps this was already supported out-of-the-box.
Any pointers or thoughts would be much appreciated.

Pinch and scroll gestures are also available on the Mac. I don't think this feature has been included in any release yet, so you'll need to get the latest source from GitHub.

Related

Cocoa GUI done with Interface Builder has correct layout on my machine, incorrect on another

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.

Can my Mac OS X App use Storyboards in 10.10 and later, but not in 10.6 through 10.9?

I am working on a consulting gig in which my client got a prototype for his App to work on Mac OS X 10.10 (Yosemite) by using a storyboard. However the App crashes on 10.9.x and earlier, because the APIs required to use storyboards in Cocoa desktop applications were not yet available.
At present the application is not very complex, so I could satisfy his immediate requirement by revising his application so as not to use storyboards at all, I would instead implement his UI "The Old-Fashioned Way", without using storyboards at all.
I'm not real sure what is the best course of action. If I implement what I just said, he will eventually find his UI deprecated by Apple. If I use a storyboard for 10.10 and later, but not on 10.9 and earlier then there could be twice as much work for my client to develop this code.
Note that, as a consultant, I could stand to gain by increasing my client's workload. I don't want to do that as I regard it as unethical to take advantage of my clients by writing bad code. I really want to do right by this fellow.
Right. Storyboards are only available in MacOS X from 10.10 (Yosemite) onward. Support for storyboards is feature of the Cocoa framework, so the fact that it doesn't exist on versions <= 10.9 means code using storyboards won't work.
I'm not real sure what is the best course of action.
I think the most reasonable solution is to explain the situation to your client and let him decide. It's going to be a long time before .xib-based code goes away, if it ever happens, so sticking to .xib files for now is not necessarily a bad choice. On the other hand, your client might prefer to have the most forward looking app you can build, and he may not care all that much about supporting older OS versions. (Several sources indicate that as of early 2015, about half of all Macs are running Yosemite.) You'll serve your client best by giving him the information he needs to make a decision and then writing the app in accordance with his wishes.

Ready iCloud + Core Data solution

I spent 10 days trying to debug iCloud connection for my (extra cool) app coming... Its really hard to set up when you use Core Data. Now it doesn't work on device with iCloud on.
I want to ask if there is ready open-source solution to copy&paste code to my app for it finally to run?
Thanks!
***Not interested in iCloud analogs like parse, dropbox...
There's code around, but code is not the problem. In the current versions of Mac OS X and iOS, and in the current version of whatever server side code they're using, Core Data with iCloud often just fails to work. This happens even if your code is exactly right. Start with Apple's sample code (including the SharedCoreData example from WWDC 2012), and if you have specific questions, ask them. But getting the code just right is not enough. File bugs and hope that future versions of Mac OS X and iOS are better.

Xcode 4 & Mac OSX 10.3?

I'm new at programming on the Mac. I've got me a brand new copy of XCode 4.0. I've got people asking me what versions of MacOSX we'll be able to support but I'm not sure what to tell them.
I see options for selecting an "SDK" and other options for selecting a target version. It seems the lowest I can go is 10.4 though -- even though we'd like to support 10.3, if possible without a lot of pain.
My question is, could anyone give me a quick rundown of how sdk versions and target versions fit into this? As I'm coding, what kind of things do I need to watch out for to make sure I can still support the smallest version of MacOSX? Likewise, how do I figure the G4/G5 (PowerPC) versions of MacOSX into all this? For example, on Windows, if I write an app in c#, I know that all I need to do is make sure an appropriate version of .net framework is installed, regardless of the OS. Does something similar hold true for the MacOSX?
Thanks in advance.
I believe Apple has dropped PowerPC support completely, including Rosetta, in Mac OS X so 10.3 is out of the question.
If you want to support PowerPC, see this related question. It looks like a lot of work.
How can we restore ppc/ppc64 as well as full 10.4/10.5 SDK support to Xcode 4?
With the analogy to the .NET Framework, there isn't anything like that for Mac OS X built-in.
It is true for Mac OS X. If your program targets 10.3 SDK, it will be able to run on 10.3 or greater. I.e. the Base SDK project setting specifies minimum target OS version.
However, supporting 10.3 IS a lot of pain. Even 10.4 is not that easy, for example Objective-C 2.0 (most important, #property, garbage collection) is only available with 10.5 SDK or above.
The common solution in existing projects is to keep an old version of software available for 10.1-10.4 users, while the new versions will require 10.5 or greater (and also usually are Intel-only).
If you're starting a new project, you will probably want to distribute it via Mac AppStore, which only works on 10.6+, which means you can safely pick 10.6 SDK as the lowest target version.
Apple is way more harsh about upgrades than Microsoft. Mac users don't walk around with 10-years old systems on their laptops. The only reasons I can think of to still use 10.3 are using 10-year old mac, not having Internet connection and not knowing what “to update a software” means. So, I wouldn't care even about 10.4, not to say 10.3.

WebGL on older Mac OS X versions (say 10.4)

Not really a programming related question but...
I'd like very much to experiment with WebGL on my spare time. My current 'spare time' machine is a MacBook running Mac OS X Tiger (10.4.xx) and I'm unable to find a new browser supporting this OS. Firefox dropped support, Chrome too, and Safari idem.
I read somewhere that this is due to a Quicktime bug that Apple won't fix.
Does anyone have more information on this issue ?
Does anyone have a clue or track to find a running implementation of WebGL on Mac OS X 10.4 ?
Cheers,
I know a fellow who is maintaining a Firefox 4 port to OS X 10.4.
Check out http://www.floodgap.com/software/tenfourfox/
Edit: Unfortunately I've just found out that this doesn't quite fulfil your main reason for wanting Firefox 4.
From the dev's site:
OpenGL support is presently disabled
in 10.4Fx. This is Apple's fault, as
Mozilla requires non-power-of-two
texture sizes, which require OpenGL 2.
Unfortunately, PPC Tiger does not
support OpenGL 2 at all, and only a
subset of cards support it in PPC
Leopard (the really irritating part is
that Intel Tiger does have OpenGL 2,
and OpenGL 2 came out in 2004!). It
may be enabled in the future for those
handful of configurations on Leopard,
but this won't benefit the majority of
users. Note that many graphics
features will work just fine; they
just won't be hardware-accelerated.
If you can get a build of Firefox which has WebGL to run, but don't have a GPU that supports OpenGL ES 2.0, you might want to try setting the "webgl.osmesalib" about:config option. Even simple programs will probably run at a flip-book frame rate however.

Resources