Re: Setting brightness and applicationWillResignActive

2014-06-23 Thread David Duncan

On Jun 22, 2014, at 8:50 PM, Jim Geist velocity...@rodentia.net wrote:

 My iOS application needs to keep the device active by disabling the idle 
 timer, but dims the display to conserve battery since it will be running for 
 long periods. This works fine, but I want to make sure to restore the user’s 
 settings if the app is switched away from.
 
 The code sets [UIScreen mainScreen].brightness back to the original settings 
 in a handler for UIApplicationWillResignActiveNotification. However, setting 
 the brightness here is ignored (as is doing it in the 
 applicationWillResignActive: handler in the application delegate).

Actually, the setting is explicitly ignored at this time to avoid large 
surprising brightness changes. If I remember correctly, the brightness change 
will be applied the next time the screen cycles between off and on if your 
application is not frontmost.

The system will also normally do this for you without needing to reset it 
during willResignActive.

 I think the problem is that by the time the notification is sent, the 
 application is already past the point where it owns the screen (a breakpoint 
 on the handler doesn’t fire until after the app is off the screen). 
 applicationDidEnterBackground: doesn’t work, either.
 
 StackOverflow, in previous threads on this, suggests rendering an alpha’ed 
 black rectangle over the app, but that’s not really useful when the intent is 
 to save battery life.
 
 Anyone have any ideas?
 
 Thanks!!
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
 
 This email sent to david.dun...@apple.com

--
David Duncan


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

NSWindowController and designated initializer rules

2014-06-23 Thread Sean McBride
Hi all,

The Obj-C designated initializer rules say that if a subclass creates a new 
designated initializer that its implementation must call (one of) the 
superclass' designated initializer.

The docs for NSWindowController say initWithWindow: is the (only) designated 
initializer.

Countless examples of NSWindowController subclassing, like Apple's Sketch 
sample code:

https://developer.apple.com/library/mac/samplecode/Sketch/Listings/SKTWindowController_m.html

do this:

- (id)init { 
// Do the regular Cocoa thing, specifying a particular nib.
self = [super initWithWindowNibName:@DrawWindow];
}

So there seems to be a contradiction here... Are the docs just omitting that 
initWithWindowNibName: is in fact a secondary designated initializer? 

Thanks,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Bavarious
On 23 Jun 2014, at 14:38, Sean McBride s...@rogue-research.com wrote:
 Hi all,
 
 The Obj-C designated initializer rules say that if a subclass creates a new 
 designated initializer that its implementation must call (one of) the 
 superclass' designated initializer.
 
 The docs for NSWindowController say initWithWindow: is the (only) designated 
 initializer.
 
 Countless examples of NSWindowController subclassing, like Apple's Sketch 
 sample code:
 
 https://developer.apple.com/library/mac/samplecode/Sketch/Listings/SKTWindowController_m.html
 
 do this:
 
 - (id)init { 
// Do the regular Cocoa thing, specifying a particular nib.
self = [super initWithWindowNibName:@DrawWindow];
 }
 
 So there seems to be a contradiction here... Are the docs just omitting that 
 initWithWindowNibName: is in fact a secondary designated initializer? 

If Sketch were strictly following these rules, -init would contain [self 
initWith…] instead of super because -init is a convenience initialiser of 
SKTWindowController. Since often times direct NSWindowController subclasses are 
final in practice (no further subclasses) and window controller initialisation 
happens after the nib file has been loaded, notably in -windowDidLoad, it’s 
common for initialisers to be almost empty, so skipping self and sending 
-initWithWindowNibName: to super doesn’t hurt.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Animating UICollectionViewCell selection

2014-06-23 Thread Rick Mann
Why is there no -[UICollectionViewCell setSelected:animated]? UITableViewCell 
has this.

But the real problem seems to be that when iOS is handling UICollectionView 
cell selection, it doesn't set selected on a cell inside an animation block.

Since I don't to participate in the cell-selection process, what's the best way 
to solve this?

TIA,

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Animating UICollectionViewCell selection

2014-06-23 Thread Luke Hiesterman
Collection view will call setSelected: on the cell inside an animation block if 
the selection is an animated one. A selection from a touch is not animated, but 
a programmatic selection which does [collectionView selectItemAtIndexPath:path 
animated:YES scrollPosition:scrollPosition] will result in setSelected: being 
called in animation block.

Luke

On Jun 23, 2014, at 4:00 PM, Rick Mann rm...@latencyzero.com wrote:

 Why is there no -[UICollectionViewCell setSelected:animated]? UITableViewCell 
 has this.
 
 But the real problem seems to be that when iOS is handling UICollectionView 
 cell selection, it doesn't set selected on a cell inside an animation block.
 
 Since I don't to participate in the cell-selection process, what's the best 
 way to solve this?
 
 TIA,
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com
 
 This email sent to luket...@apple.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Animating UICollectionViewCell selection

2014-06-23 Thread Rick Mann

On Jun 23, 2014, at 16:17 , Luke Hiesterman luket...@apple.com wrote:

 Because the touch is an instantaneous event, so the selection should show 
 immediately. Similarly, you’ll notice when you select a table cell with 
 touch, the selection does not animate in - it appears immediately.

I suppose that's true. But it sure looks nice when it animates in the selection 
(provided it's sufficiently fast, like 0.1 s).

 
 Luke
 
 On Jun 23, 2014, at 4:09 PM, Rick Mann rm...@latencyzero.com wrote:
 
 The problem is, I want selection from touch to be animated. Why wouldn't it 
 be?
 
 Sent from my iPhone
 
 On Jun 23, 2014, at 16:07, Luke Hiesterman luket...@apple.com wrote:
 
 Collection view will call setSelected: on the cell inside an animation 
 block if the selection is an animated one. A selection from a touch is not 
 animated, but a programmatic selection which does [collectionView 
 selectItemAtIndexPath:path animated:YES scrollPosition:scrollPosition] will 
 result in setSelected: being called in animation block.
 
 Luke
 
 On Jun 23, 2014, at 4:00 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Why is there no -[UICollectionViewCell setSelected:animated]? 
 UITableViewCell has this.
 
 But the real problem seems to be that when iOS is handling 
 UICollectionView cell selection, it doesn't set selected on a cell inside 
 an animation block.
 
 Since I don't to participate in the cell-selection process, what's the 
 best way to solve this?
 
 TIA,
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com
 
 This email sent to luket...@apple.com
 
 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Keary Suska
On Jun 23, 2014, at 11:38 AM, Sean McBride wrote:

 Hi all,
 
 The Obj-C designated initializer rules say that if a subclass creates a new 
 designated initializer that its implementation must call (one of) the 
 superclass' designated initializer.
 
 The docs for NSWindowController say initWithWindow: is the (only) designated 
 initializer.
 
 Countless examples of NSWindowController subclassing, like Apple's Sketch 
 sample code:
 
 https://developer.apple.com/library/mac/samplecode/Sketch/Listings/SKTWindowController_m.html
 
 do this:
 
 - (id)init { 
// Do the regular Cocoa thing, specifying a particular nib.
self = [super initWithWindowNibName:@DrawWindow];
 }
 
 So there seems to be a contradiction here... Are the docs just omitting that 
 initWithWindowNibName: is in fact a secondary designated initializer? 


My understanding of Objective-C convention rules is that *every* initializer 
*should* call the designated initializer, and that the API follows this 
convention, unless documented otherwise...

Keary Suska
Esoteritech, Inc.
Demystifying technology for your home or business


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Graham Cox

On 24 Jun 2014, at 3:38 am, Sean McBride s...@rogue-research.com wrote:

 The Obj-C designated initializer rules say that if a subclass creates a new 
 designated initializer that its implementation must call (one of) the 
 superclass' designated initializer.
 
 The docs for NSWindowController say initWithWindow: is the (only) designated 
 initializer.
 
 Countless examples of NSWindowController subclassing, like Apple's Sketch 
 sample code:
 
 https://developer.apple.com/library/mac/samplecode/Sketch/Listings/SKTWindowController_m.html
 
 do this:
 
 - (id)init { 
// Do the regular Cocoa thing, specifying a particular nib.
self = [super initWithWindowNibName:@DrawWindow];
 }
 
 So there seems to be a contradiction here... Are the docs just omitting that 
 initWithWindowNibName: is in fact a secondary designated initializer? 


I interpret that to mean it must call a designated initializer *eventually*, 
not necessarily directly. Since all -initXXX methods of the superclass must 
call the superclass's designated initializer, your subclass's D.I. can call any 
of the superclass's -initXXX methods.

--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

NSTableHeaderView split

2014-06-23 Thread Varun Chandramohan
Hi All,

Is there ant simple to have a split header view to generalise sub header? Here 
is an example of what I want to achieve using NSTableHeaderView?

---
|header 1  |  Common Header Txt   |
|  | 
-
|  |   header 2 |   header 3 | header 4| header 5  |

|   row 1| || | 
  |


Is there any other way to do the same?

Regards,
Varun
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTableHeaderView split

2014-06-23 Thread Graham Cox

On 24 Jun 2014, at 10:35 am, Varun Chandramohan varun.chandramo...@wontok.com 
wrote:

 Hi All,
 
 Is there ant simple to have a split header view to generalise sub header? 
 Here is an example of what I want to achieve using NSTableHeaderView?
 
 ---
 |header 1  |  Common Header Txt   
 |
 |  | 
 -
 |  |   header 2 |   header 3 | header 4| header 5  |
 
 |   row 1| || 
 |   |
 
 
 Is there any other way to do the same?


Subclass the NSTableHeaderView and do whatever you want - it's just a view, you 
can customise it and draw whatever you want in there. Its -headerRectOfColumn: 
method supplies the positions of the divider lines, you can use that to draw 
dividers and position text as you wish.

--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Single-item action sheet wrong size

2014-06-23 Thread Rick Mann
I'm trying to implement something like the photos app delete button. I present 
the action sheet to confirm deletion, but the sheet is too large for the single 
button; there's a larger gap below the button than above it. Any idea what's 
going on, or how to address it?


http://cl.ly/image/3S2y3G1h2X17/Screen%20Shot%202014-06-23%20at%2017.41.50%20.png

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Can't set UINavigationBar tint color?

2014-06-23 Thread Rick Mann
I'm having a heck of a time setting the tint color for a navigation bar. I 
can't set it in IB (my controller is contained in a UINavigationController, 
which is embedded in another custom controller). I can't set the tint bar 
directly when the root navigation controller is embedded in its container, and 
I can't set it via the contained controller in its viewDidLoad.

I've also tried setting the tintColor on the window at startup, and I've tried 
setting the UINavigationBar appearance's tint color. None seems to have an 
effect.

What am I doing wrong?

Thanks!

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Quincey Morris
On Jun 23, 2014, at 17:30 , Graham Cox graham@bigpond.com wrote:

 I interpret that to mean it must call a designated initializer *eventually*, 
 not necessarily directly. Since all -initXXX methods of the superclass must 
 call the superclass's designated initializer, your subclass's D.I. can call 
 any of the superclass's -initXXX methods.

Actually, I understood the thrust of Sean’s question as being that 
NSWindowController’s initializers don’t follow Swift rules.

If you look in the Swift book, you’ll see that convenience constructions may 
only call “across” (that is, call an initializer in the same class), while 
designated constructors may only call “up” (to a *designated* initializer in 
the superclass).

In that regard, ‘initWithWindowNibName:’ must be a designated initializer, 
since subclasses that don’t do their own nib loading have nothing else to call 
“up” to.

I assume, therefore, that ‘initWithWindowNibName:’ is marked as a designated 
initializer in 10.10, though I haven’t looked to check this.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Roland King

On 24 Jun, 2014, at 9:14 am, Quincey Morris 
quinceymor...@rivergatesoftware.com wrote:

 On Jun 23, 2014, at 17:30 , Graham Cox graham@bigpond.com wrote:
 
 I interpret that to mean it must call a designated initializer *eventually*, 
 not necessarily directly. Since all -initXXX methods of the superclass must 
 call the superclass's designated initializer, your subclass's D.I. can call 
 any of the superclass's -initXXX methods.
 
 Actually, I understood the thrust of Sean’s question as being that 
 NSWindowController’s initializers don’t follow Swift rules.
 
 If you look in the Swift book, you’ll see that convenience constructions may 
 only call “across” (that is, call an initializer in the same class), while 
 designated constructors may only call “up” (to a *designated* initializer in 
 the superclass).
 
 In that regard, ‘initWithWindowNibName:’ must be a designated initializer, 
 since subclasses that don’t do their own nib loading have nothing else to 
 call “up” to.
 
 I assume, therefore, that ‘initWithWindowNibName:’ is marked as a designated 
 initializer in 10.10, though I haven’t looked to check this.
 

You knew I'd have to look didn't you :)

It's .. not (see below). However there's the Automatic Initializer Inheritance 
rules which say that if the subclass doesn't define any designated initializers 
it inherits them, and if it has implementations of all the designated 
initializers it inherits the convenience ones as well. I think by that 
inheritance you get enough stuff inherited to allow you to call 
initWithWindowNibName:. 

Could probably test that in a playground by implementing a designated 
initializer to break the automatic inheritance and seeing what you then can't 
do. 

Nobody said Swift was simple. 

/* Designated Initializer.  window can be nil.  All other -init... methods call 
this, and then possibly do other setup.
 */
- (instancetype)initWithWindow:(NSWindow *)window NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;

/* Instances initialized with the Name methods will eventually locate their 
nib file in the file's owner's class' bundle or in the app's +mainBundle using 
standard NSBundle API.  Use the Path method if your nib file is at a fixed 
location (which is not inside one of those bundles).
 */
- (instancetype)initWithWindowNibName:(NSString *)windowNibName;// self 
is the owner
- (instancetype)initWithWindowNibName:(NSString *)windowNibName 
owner:(id)owner; // The owner is NOT retained
- (instancetype)initWithWindowNibPath:(NSString *)windowNibPath owner:(id)owner;


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Carl Hoefs
FWIW, for setting the UINavigationBar color you can specify any color as long 
as it's white. The -tintColor method appears to specify the color of the text 
within the navbar button items only. 
-Carl

On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:

 I'm having a heck of a time setting the tint color for a navigation bar. I 
 can't set it in IB (my controller is contained in a UINavigationController, 
 which is embedded in another custom controller). I can't set the tint bar 
 directly when the root navigation controller is embedded in its container, 
 and I can't set it via the contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and I've 
 tried setting the UINavigationBar appearance's tint color. None seems to have 
 an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Rick Mann
Before, I had the nav bar as a separate entity in my view hierarchy. Then, I 
was able to select it and set the tint color to the color I wanted in IB.

I changed things to a formal UINavigationController stack to make it easier for 
my contained class to modify the items in the nav bar, and now there seems to 
be no way to change the color.

On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:

 FWIW, for setting the UINavigationBar color you can specify any color as long 
 as it's white. The -tintColor method appears to specify the color of the text 
 within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation bar. I 
 can't set it in IB (my controller is contained in a UINavigationController, 
 which is embedded in another custom controller). I can't set the tint bar 
 directly when the root navigation controller is embedded in its container, 
 and I can't set it via the contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and I've 
 tried setting the UINavigationBar appearance's tint color. None seems to 
 have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Carl Hoefs
Are you on iOS 7? You're describing an iOS 6 behavior. Doing the following on 
iOS 7 (in -viewDidLoad):

self.navigationController.navigationBar.tintColor = [UIColor redColor];

has no effect other than changing the text within the bar items. Under iOS 6 it 
changed the tint of the entire navigation bar.
-Carl


On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:

 Before, I had the nav bar as a separate entity in my view hierarchy. Then, I 
 was able to select it and set the tint color to the color I wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it easier 
 for my contained class to modify the items in the nav bar, and now there 
 seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color as 
 long as it's white. The -tintColor method appears to specify the color of 
 the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation bar. I 
 can't set it in IB (my controller is contained in a UINavigationController, 
 which is embedded in another custom controller). I can't set the tint bar 
 directly when the root navigation controller is embedded in its container, 
 and I can't set it via the contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and I've 
 tried setting the UINavigationBar appearance's tint color. None seems to 
 have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Rick Mann
iOS 7.1 in the simulator.

On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:

 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the following on 
 iOS 7 (in -viewDidLoad):
 
self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under iOS 6 
 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. Then, I 
 was able to select it and set the tint color to the color I wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it easier 
 for my contained class to modify the items in the nav bar, and now there 
 seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color as 
 long as it's white. The -tintColor method appears to specify the color of 
 the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation bar. I 
 can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom controller). I 
 can't set the tint bar directly when the root navigation controller is 
 embedded in its container, and I can't set it via the contained controller 
 in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and I've 
 tried setting the UINavigationBar appearance's tint color. None seems to 
 have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Carl Hoefs
-tintColor
The tint color to apply to the navigation items and bar button items.

If you do manage to get it working under iOS 7, post it! The white nav bar is 
the ugliest part of my app!
-Carl


On Jun 23, 2014, at 6:53 PM, Rick Mann rm...@latencyzero.com wrote:

 iOS 7.1 in the simulator.
 
 On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:
 
 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the following 
 on iOS 7 (in -viewDidLoad):
 
   self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under iOS 6 
 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. Then, 
 I was able to select it and set the tint color to the color I wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it easier 
 for my contained class to modify the items in the nav bar, and now there 
 seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color as 
 long as it's white. The -tintColor method appears to specify the color of 
 the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation bar. 
 I can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom controller). 
 I can't set the tint bar directly when the root navigation controller is 
 embedded in its container, and I can't set it via the contained 
 controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and I've 
 tried setting the UINavigationBar appearance's tint color. None seems to 
 have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Rick Mann
Found it! It's barTintColor!

Thanks for getting me to look in the headers!

On Jun 23, 2014, at 18:56 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:

 -tintColor
 The tint color to apply to the navigation items and bar button items.
 
 If you do manage to get it working under iOS 7, post it! The white nav bar is 
 the ugliest part of my app!
 -Carl
 
 
 On Jun 23, 2014, at 6:53 PM, Rick Mann rm...@latencyzero.com wrote:
 
 iOS 7.1 in the simulator.
 
 On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the following 
 on iOS 7 (in -viewDidLoad):
 
  self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under iOS 
 6 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. Then, 
 I was able to select it and set the tint color to the color I wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it 
 easier for my contained class to modify the items in the nav bar, and now 
 there seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color as 
 long as it's white. The -tintColor method appears to specify the color of 
 the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation bar. 
 I can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom controller). 
 I can't set the tint bar directly when the root navigation controller is 
 embedded in its container, and I can't set it via the contained 
 controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and I've 
 tried setting the UINavigationBar appearance's tint color. None seems to 
 have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Carl Hoefs
Ah! You're a genius! It works perfectly!
-Carl

On Jun 23, 2014, at 6:56 PM, Rick Mann rm...@latencyzero.com wrote:

 Found it! It's barTintColor!
 
 Thanks for getting me to look in the headers!
 
 On Jun 23, 2014, at 18:56 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:
 
 -tintColor
 The tint color to apply to the navigation items and bar button items.
 
 If you do manage to get it working under iOS 7, post it! The white nav bar 
 is the ugliest part of my app!
 -Carl
 
 
 On Jun 23, 2014, at 6:53 PM, Rick Mann rm...@latencyzero.com wrote:
 
 iOS 7.1 in the simulator.
 
 On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the following 
 on iOS 7 (in -viewDidLoad):
 
 self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under iOS 
 6 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. 
 Then, I was able to select it and set the tint color to the color I 
 wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it 
 easier for my contained class to modify the items in the nav bar, and now 
 there seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color as 
 long as it's white. The -tintColor method appears to specify the color 
 of the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation 
 bar. I can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom 
 controller). I can't set the tint bar directly when the root navigation 
 controller is embedded in its container, and I can't set it via the 
 contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and 
 I've tried setting the UINavigationBar appearance's tint color. None 
 seems to have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Rick Mann
A genius wouldn't have spent the last 2 hours on this...

Especially because I think I've run into this before. Augh, too many projects 
on too many platforms.

On Jun 23, 2014, at 19:00 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:

 Ah! You're a genius! It works perfectly!
 -Carl
 
 On Jun 23, 2014, at 6:56 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Found it! It's barTintColor!
 
 Thanks for getting me to look in the headers!
 
 On Jun 23, 2014, at 18:56 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 -tintColor
 The tint color to apply to the navigation items and bar button items.
 
 If you do manage to get it working under iOS 7, post it! The white nav bar 
 is the ugliest part of my app!
 -Carl
 
 
 On Jun 23, 2014, at 6:53 PM, Rick Mann rm...@latencyzero.com wrote:
 
 iOS 7.1 in the simulator.
 
 On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the 
 following on iOS 7 (in -viewDidLoad):
 
 self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under 
 iOS 6 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. 
 Then, I was able to select it and set the tint color to the color I 
 wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it 
 easier for my contained class to modify the items in the nav bar, and 
 now there seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color 
 as long as it's white. The -tintColor method appears to specify the 
 color of the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation 
 bar. I can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom 
 controller). I can't set the tint bar directly when the root 
 navigation controller is embedded in its container, and I can't set it 
 via the contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and 
 I've tried setting the UINavigationBar appearance's tint color. None 
 seems to have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Carl Hoefs
Relax. You've just helped improve iOS apps all across the globe!
-Carl

On Jun 23, 2014, at 7:01 PM, Rick Mann rm...@latencyzero.com wrote:

 A genius wouldn't have spent the last 2 hours on this...
 
 Especially because I think I've run into this before. Augh, too many projects 
 on too many platforms.
 
 On Jun 23, 2014, at 19:00 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:
 
 Ah! You're a genius! It works perfectly!
 -Carl
 
 On Jun 23, 2014, at 6:56 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Found it! It's barTintColor!
 
 Thanks for getting me to look in the headers!
 
 On Jun 23, 2014, at 18:56 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 -tintColor
 The tint color to apply to the navigation items and bar button items.
 
 If you do manage to get it working under iOS 7, post it! The white nav bar 
 is the ugliest part of my app!
 -Carl
 
 
 On Jun 23, 2014, at 6:53 PM, Rick Mann rm...@latencyzero.com wrote:
 
 iOS 7.1 in the simulator.
 
 On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the 
 following on iOS 7 (in -viewDidLoad):
 
 self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under 
 iOS 6 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. 
 Then, I was able to select it and set the tint color to the color I 
 wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it 
 easier for my contained class to modify the items in the nav bar, and 
 now there seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color 
 as long as it's white. The -tintColor method appears to specify the 
 color of the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation 
 bar. I can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom 
 controller). I can't set the tint bar directly when the root 
 navigation controller is embedded in its container, and I can't set 
 it via the contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and 
 I've tried setting the UINavigationBar appearance's tint color. None 
 seems to have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't set UINavigationBar tint color?

2014-06-23 Thread Rick Mann
Heh, thanks.

I also wrote a bug to Apple saying I should be able to do this in IB.

On Jun 23, 2014, at 19:04 , Carl Hoefs newsli...@autonomy.caltech.edu wrote:

 Relax. You've just helped improve iOS apps all across the globe!
 -Carl
 
 On Jun 23, 2014, at 7:01 PM, Rick Mann rm...@latencyzero.com wrote:
 
 A genius wouldn't have spent the last 2 hours on this...
 
 Especially because I think I've run into this before. Augh, too many 
 projects on too many platforms.
 
 On Jun 23, 2014, at 19:00 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 Ah! You're a genius! It works perfectly!
 -Carl
 
 On Jun 23, 2014, at 6:56 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Found it! It's barTintColor!
 
 Thanks for getting me to look in the headers!
 
 On Jun 23, 2014, at 18:56 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 -tintColor
 The tint color to apply to the navigation items and bar button items.
 
 If you do manage to get it working under iOS 7, post it! The white nav 
 bar is the ugliest part of my app!
 -Carl
 
 
 On Jun 23, 2014, at 6:53 PM, Rick Mann rm...@latencyzero.com wrote:
 
 iOS 7.1 in the simulator.
 
 On Jun 23, 2014, at 18:52 , Carl Hoefs newsli...@autonomy.caltech.edu 
 wrote:
 
 Are you on iOS 7? You're describing an iOS 6 behavior. Doing the 
 following on iOS 7 (in -viewDidLoad):
 
 self.navigationController.navigationBar.tintColor = [UIColor redColor];
 
 has no effect other than changing the text within the bar items. Under 
 iOS 6 it changed the tint of the entire navigation bar.
 -Carl
 
 
 On Jun 23, 2014, at 6:41 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Before, I had the nav bar as a separate entity in my view hierarchy. 
 Then, I was able to select it and set the tint color to the color I 
 wanted in IB.
 
 I changed things to a formal UINavigationController stack to make it 
 easier for my contained class to modify the items in the nav bar, and 
 now there seems to be no way to change the color.
 
 On Jun 23, 2014, at 18:34 , Carl Hoefs 
 newsli...@autonomy.caltech.edu wrote:
 
 FWIW, for setting the UINavigationBar color you can specify any color 
 as long as it's white. The -tintColor method appears to specify the 
 color of the text within the navbar button items only. 
 -Carl
 
 On Jun 23, 2014, at 6:08 PM, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a heck of a time setting the tint color for a navigation 
 bar. I can't set it in IB (my controller is contained in a 
 UINavigationController, which is embedded in another custom 
 controller). I can't set the tint bar directly when the root 
 navigation controller is embedded in its container, and I can't set 
 it via the contained controller in its viewDidLoad.
 
 I've also tried setting the tintColor on the window at startup, and 
 I've tried setting the UINavigationBar appearance's tint color. None 
 seems to have an effect.
 
 What am I doing wrong?
 
 Thanks!
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 
 
 
 -- 
 Rick
 
 
 
 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

App Store, Sandbox and loadable code bundle

2014-06-23 Thread Trygve Inda
I have an app that normally exists as a System Preference Pane. To get it to
work in an app, and share the same code as the prefPane, I built a small
host app that simply loads the prefPane (a Mach-O bundle) with:

[self setPaneObject:[[[paneClass alloc] initWithBundle:paneBundle]
autorelease]];
if ([paneObject loadMainView])
{
[paneObject willSelect];

 // Add view to window and adjust size
 [window setContentSize:[[paneObject mainView] frame].size];
 [window setContentView:[paneObject mainView]];
 [window center];
 [window makeKeyAndOrderFront:self];

 [paneObject didSelect];
}


Both the app and the .bundle are codesigned. The .bundle resides within the
host app's package and the whole thing is sandboxed.

It works fine on my system, but is there any reason Apple will not approve
of this? The Mach-O code bundle gets loaded into the main app and becomes
part of it.

Has anyone submitted something to the App Store that works like this?

Thanks,

Trygve



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: App Store, Sandbox and loadable code bundle

2014-06-23 Thread Graham Cox

On 24 Jun 2014, at 12:48 pm, Trygve Inda cocoa...@xericdesign.com wrote:

 It works fine on my system, but is there any reason Apple will not approve
 of this? The Mach-O code bundle gets loaded into the main app and becomes
 part of it.
 
 Has anyone submitted something to the App Store that works like this?


I can't say definitively, but I think it's OK to load helper apps or other code 
into your own app from your own bundle as long as it's all signed. It's not 
really any different from loading a framework of your own and I've definitely 
had no problems doing that in an App Store app. The loaded code has the same 
restrictions as the host app, and can't touch anything outside the sandbox 
without the usual permissions.

--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Graham Cox

On 24 Jun 2014, at 11:14 am, Quincey Morris 
quinceymor...@rivergatesoftware.com wrote:

 Actually, I understood the thrust of Sean’s question as being that 
 NSWindowController’s initializers don’t follow Swift rules.
 

Well, Swift wasn't mentioned at all in the OP, but this was:

 The Obj-C designated initializer rules say

And the example code is Obj-C. Why would Swift come into it?

--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Quincey Morris
On Jun 23, 2014, at 20:16 , Graham Cox graham@bigpond.com wrote:

 And the example code is Obj-C. Why would Swift come into it?

Sorry, I wasn’t carping at you. It just occurred to me that “no one cares” in 
the pure Obj-C case — we know that invoking ‘super initWithWindowNibName:’ is 
safe, since we’ve all done it for years.

Hence my speculation that it was Swift’s greater formalism that got Sean 
thinking about this. Speculation only. Anyway, I believe Roland’s answer is 
correct: Swift has a loophole that lets the NSWindowController init pattern 
work there too.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Greg Parker
On Jun 23, 2014, at 8:16 PM, Graham Cox graham@bigpond.com wrote:
 On 24 Jun 2014, at 11:14 am, Quincey Morris 
 quinceymor...@rivergatesoftware.com wrote:
 Actually, I understood the thrust of Sean’s question as being that 
 NSWindowController’s initializers don’t follow Swift rules.
 
 Well, Swift wasn't mentioned at all in the OP, but this was:
 
 The Obj-C designated initializer rules say
 
 And the example code is Obj-C. Why would Swift come into it?

Because Swift is codifying and enforcing Objective-C's designated initializer 
pattern. Similar enforcement in Objective-C will take longer to adopt.


-- 
Greg Parker gpar...@apple.com Runtime Wrangler



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSWindowController and designated initializer rules

2014-06-23 Thread Graham Cox

On 24 Jun 2014, at 2:33 pm, Quincey Morris 
quinceymor...@rivergatesoftware.com wrote:

 Sorry, I wasn’t carping at you


Nor I at you - I was just curious as to how the discussion suddenly veered over 
into Swift.

 Because Swift is codifying and enforcing Objective-C's designated initializer 
 pattern. Similar enforcement in Objective-C will take longer to adopt.

Understood.

--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Advice on document handling

2014-06-23 Thread John Brownie
Thanks all for the input. I ended up keeping file wrappers for the 
expensive parts of the bundle, invalidating them when an action takes 
place, and that has brought the save time down to an acceptable level in 
most cases.


John
--
John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg
Summer Institute of Linguistics  | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com