0

我需要在 PaintingView.m 视图之外更改 GLPaint 的画笔大小。我怎样才能做到这一点?我首先考虑使用 NSNotification 将值传输到 PaintingView.m 控制器 - 尽管从那里我不完全确定该怎么做,因为画笔大小是在 .h 文件中定义的?

如果可能的话,请提供一些想法和一个小例子。

非常感激。

4

1 回答 1

0

Use NSUserDefaults For store size value of brush and pass this NSUserDefaults value in .m file. Now, you can change your NSUserDefaults value from anywhere in application and also in delegate file as well using Notification. So, Whatever size store in NSUserDefaults that will automatically come in .m file.

Hope, this may help you..

于 2012-05-08T07:47:05.403 回答