开发者

How do I draw music notes on a staff in an iOS or Mac app? [closed]

开发者 https://www.devze.com 2023-01-17 14:49 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_JAVA技巧

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question

I want to write a program that will generate random notes and draw them on the screen on a staff. I want to use Cocoa or Cocoa Touch. What's the best way to go about displaying the notes? Should I somehow use a music font, or pngs of each note, or what? Are there any good tutorials or sources of info out there on this topic?


I would be very tempted to use a custom music font and render it using the new ability in iOS4 to import custom fonts (I'm pretty sure it's iOS4 in general, and not just the iPad). I also assume that the entirety of CoreText is available on the mac too, but even if not, I'm sure the code wouldn't be vastly different.

Anyway, you can read about loading custom fonts here;

http://www.freetimestudios.com/2010/09/20/ipad-and-ios-4-custom-font-loading/

Or the slightly more hardcore way here;

http://www.freetimestudios.com/2010/09/13/custom-fonts-on-the-ipad-and-ios-4/

0

精彩评论

暂无评论...
验证码 换一张
取 消