Re: Problem loading a CoreDataModel from a Static library in Swift

2015-12-15 Thread Sixten Otto
You might want to include some of your code for loading the model, to make
this discussion less hypothetical.

Also, when you say that "ObjC works just fine", what does that mean?
Objective-C code in the same app that's trying to load the same model that
Swift code in that app can't load? Or some separate test written in
Objective-C?

On Mon, Dec 14, 2015 at 6:55 AM, Jim Adams  wrote:

> Not sure where to ask this question. I just started trying Swift to see
> how my company’s SDK could be integrated. I am getting this error:
> CoreData: Failed to load optimized model at path …/modle.omo’
>
> This is a static library with an associated bundle that contains the
> CoreData model. ObjC works just fine. The code seems to run but the
> warning/error is disturbing. I searched all over Google and only found a
> mention of the Google Maps SDK. There was no post of the solution other
> than re-compiling with Xcode 7. Since we already build with Xcode 7 I am at
> a loss. Anyone else seen 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/himself%40sfko.com
>
> This email sent to hims...@sfko.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

Custom font for UIAlertAction

2015-12-15 Thread Eric E. Dolecki
I am hoping to change the font for the buttons in a UIAlertController (not
the color, just the face as the styles give me what I want). It doesn’t
appear I can use an attributedString (takes String) - is there any action I
can take to achieve this besides subclassing?

Eric
___

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: Problem loading a CoreDataModel from a Static library in Swift

2015-12-15 Thread Jim Adams
What I mean is that if I create an App using ObjC and include my library and 
bundle there is no error message. This message only happens with Swift based 
apps. Apparently The Google Maps SDK had the same issue but their resolution 
was sketchy.

> On Dec 15, 2015, at 9:41 AM, Sixten Otto  wrote:
> 
> You might want to include some of your code for loading the model, to make
> this discussion less hypothetical.
> 
> Also, when you say that "ObjC works just fine", what does that mean?
> Objective-C code in the same app that's trying to load the same model that
> Swift code in that app can't load? Or some separate test written in
> Objective-C?
> 
> On Mon, Dec 14, 2015 at 6:55 AM, Jim Adams  wrote:
> 
>> Not sure where to ask this question. I just started trying Swift to see
>> how my company’s SDK could be integrated. I am getting this error:
>> CoreData: Failed to load optimized model at path …/modle.omo’
>> 
>> This is a static library with an associated bundle that contains the
>> CoreData model. ObjC works just fine. The code seems to run but the
>> warning/error is disturbing. I searched all over Google and only found a
>> mention of the Google Maps SDK. There was no post of the solution other
>> than re-compiling with Xcode 7. Since we already build with Xcode 7 I am at
>> a loss. Anyone else seen 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/himself%40sfko.com
>> 
>> This email sent to hims...@sfko.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/jim.adams%40sas.com
> 
> This email sent to jim.ad...@sas.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: Custom font for UIAlertAction

2015-12-15 Thread Wojciech Czekalski
Yes, you can recursively iterate through the alert view's subviews and check 
for a UILabel and set the font on it. It's hacky but I don't think there's 
another way

Wysłane z iPhone'a

Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki  napisał(a):

> I am hoping to change the font for the buttons in a UIAlertController (not
> the color, just the face as the styles give me what I want). It doesn’t
> appear I can use an attributedString (takes String) - is there any action I
> can take to achieve this besides subclassing?
> 
> Eric
> ___
> 
> 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/wczekalski%40me.com
> 
> This email sent to wczekal...@me.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: Custom font for UIAlertAction

2015-12-15 Thread David Duncan

> On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski  wrote:
> 
> Yes, you can recursively iterate through the alert view's subviews and check 
> for a UILabel and set the font on it. It's hacky but I don't think there's 
> another way

Do NOT do things like this. The view hierarchy is considered private and the 
results of any changes you make are not guaranteed to continue working into the 
future.

> 
> Wysłane z iPhone'a
> 
> Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki  napisał(a):
> 
>> I am hoping to change the font for the buttons in a UIAlertController (not
>> the color, just the face as the styles give me what I want). It doesn’t
>> appear I can use an attributedString (takes String) - is there any action I
>> can take to achieve this besides subclassing?
>> 
>> Eric
>> ___
>> 
>> 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/wczekalski%40me.com
>> 
>> This email sent to wczekal...@me.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/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

Re: Custom font for UIAlertAction

2015-12-15 Thread Wojciech Czekalski
I dont recommend it either but it is possible to do it this way. It requires 
extensive testing etc. If done properly however won't crash your app if 
anything but will silently fail. 

Wysłane z iPhone'a

Dnia 15.12.2015 o godz. 18:04 David Duncan  napisał(a):

> 
>> On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski  wrote:
>> 
>> Yes, you can recursively iterate through the alert view's subviews and check 
>> for a UILabel and set the font on it. It's hacky but I don't think there's 
>> another way
> 
> Do NOT do things like this. The view hierarchy is considered private and the 
> results of any changes you make are not guaranteed to continue working into 
> the future.
> 
>> 
>> Wysłane z iPhone'a
>> 
>> Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki  
>> napisał(a):
>> 
>>> I am hoping to change the font for the buttons in a UIAlertController (not
>>> the color, just the face as the styles give me what I want). It doesn’t
>>> appear I can use an attributedString (takes String) - is there any action I
>>> can take to achieve this besides subclassing?
>>> 
>>> Eric
>>> ___
>>> 
>>> 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/wczekalski%40me.com
>>> 
>>> This email sent to wczekal...@me.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/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

Re: Custom font for UIAlertAction

2015-12-15 Thread David Duncan

> On Dec 15, 2015, at 10:23 AM, Wojciech Czekalski  wrote:
> 
> I dont recommend it either but it is possible to do it this way. It requires 
> extensive testing etc. If done properly however won't crash your app if 
> anything but will silently fail. 

What I’m saying is that UIKit won’t guarantee that this won’t someday crash 
your application. Doing things like this is wholly undefined, do not do them.

> 
> Wysłane z iPhone'a
> 
> Dnia 15.12.2015 o godz. 18:04 David Duncan  
> napisał(a):
> 
>> 
>>> On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski  wrote:
>>> 
>>> Yes, you can recursively iterate through the alert view's subviews and 
>>> check for a UILabel and set the font on it. It's hacky but I don't think 
>>> there's another way
>> 
>> Do NOT do things like this. The view hierarchy is considered private and the 
>> results of any changes you make are not guaranteed to continue working into 
>> the future.
>> 
>>> 
>>> Wysłane z iPhone'a
>>> 
>>> Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki  
>>> napisał(a):
>>> 
 I am hoping to change the font for the buttons in a UIAlertController (not
 the color, just the face as the styles give me what I want). It doesn’t
 appear I can use an attributedString (takes String) - is there any action I
 can take to achieve this besides subclassing?
 
 Eric
 ___
 
 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/wczekalski%40me.com
 
 This email sent to wczekal...@me.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/david.duncan%40apple.com
>>> 
>>> This email sent to david.dun...@apple.com
>> 
>> --
>> David Duncan
>> 

--
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

Re: Custom font for UIAlertAction

2015-12-15 Thread Doug Hill
I will echo the sentiments NOT to poke around into view hierarchies which 
aren’t public parts of the interface. It might work now but you will lose in 
the long run when Apple changes something, which they will.

I suggest looking into using Appearance proxies. You can change just about any 
style/appearance of UI controls, either app-wide or when controls are contained 
in a specific view controller. I’ve done this for many UIKit views/controllers 
with great results, particularly when there isn’t a public interface to modify 
their style.

Doug Hill


> On Dec 15, 2015, at 10:43 AM, David Duncan  wrote:
> 
>> 
>> On Dec 15, 2015, at 10:23 AM, Wojciech Czekalski > > wrote:
>> 
>> I dont recommend it either but it is possible to do it this way. It requires 
>> extensive testing etc. If done properly however won't crash your app if 
>> anything but will silently fail. 
> 
> What I’m saying is that UIKit won’t guarantee that this won’t someday crash 
> your application. Doing things like this is wholly undefined, do not do them.
> 
>> 
>> Wysłane z iPhone'a
>> 
>> Dnia 15.12.2015 o godz. 18:04 David Duncan  
>> napisał(a):
>> 
>>> 
 On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski  wrote:
 
 Yes, you can recursively iterate through the alert view's subviews and 
 check for a UILabel and set the font on it. It's hacky but I don't think 
 there's another way
>>> 
>>> Do NOT do things like this. The view hierarchy is considered private and 
>>> the results of any changes you make are not guaranteed to continue working 
>>> into the future.
>>> 
 
 Wysłane z iPhone'a
 
 Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki  
 napisał(a):
 
> I am hoping to change the font for the buttons in a UIAlertController (not
> the color, just the face as the styles give me what I want). It doesn’t
> appear I can use an attributedString (takes String) - is there any action 
> I
> can take to achieve this besides subclassing?
> 
> Eric

___

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: Custom font for UIAlertAction

2015-12-15 Thread Eric E. Dolecki
It would appear that the UIAlertController (UIAlertAction) does not conform
to appearance proxies. Here is a list of controls that do (up to iOS 8.0)

On Tue, Dec 15, 2015 at 2:09 PM Doug Hill  wrote:

> I will echo the sentiments NOT to poke around into view hierarchies which
> aren’t public parts of the interface. It might work now but you will lose
> in the long run when Apple changes something, which they will.
>
> I suggest looking into using Appearance proxies. You can change just about
> any style/appearance of UI controls, either app-wide or when controls are
> contained in a specific view controller. I’ve done this for many UIKit
> views/controllers with great results, particularly when there isn’t a
> public interface to modify their style.
>
> Doug Hill
>
>
> > On Dec 15, 2015, at 10:43 AM, David Duncan 
> wrote:
> >
> >>
> >> On Dec 15, 2015, at 10:23 AM, Wojciech Czekalski  > wrote:
> >>
> >> I dont recommend it either but it is possible to do it this way. It
> requires extensive testing etc. If done properly however won't crash your
> app if anything but will silently fail.
> >
> > What I’m saying is that UIKit won’t guarantee that this won’t someday
> crash your application. Doing things like this is wholly undefined, do not
> do them.
> >
> >>
> >> Wysłane z iPhone'a
> >>
> >> Dnia 15.12.2015 o godz. 18:04 David Duncan 
> napisał(a):
> >>
> >>>
>  On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski 
> wrote:
> 
>  Yes, you can recursively iterate through the alert view's subviews
> and check for a UILabel and set the font on it. It's hacky but I don't
> think there's another way
> >>>
> >>> Do NOT do things like this. The view hierarchy is considered private
> and the results of any changes you make are not guaranteed to continue
> working into the future.
> >>>
> 
>  Wysłane z iPhone'a
> 
>  Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki 
> napisał(a):
> 
> > I am hoping to change the font for the buttons in a
> UIAlertController (not
> > the color, just the face as the styles give me what I want). It
> doesn’t
> > appear I can use an attributedString (takes String) - is there any
> action I
> > can take to achieve this besides subclassing?
> >
> > Eric
>
> ___
>
> 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/edolecki%40gmail.com
>
> This email sent to edole...@gmail.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: Custom font for UIAlertAction

2015-12-15 Thread Doug Hill
What I do is use the Appearance proxies to customize the button, not the 
UIAlertController. For example, use the Appearance proxy to set font of a 
button when contained in a UIAlertController.

Doug Hill
 
> On Dec 15, 2015, at 12:09 PM, Eric E. Dolecki  wrote:
> 
> It would appear that the UIAlertController (UIAlertAction) does not conform 
> to appearance proxies. Here is a list of controls that do (up to iOS 8.0)
> 
> On Tue, Dec 15, 2015 at 2:09 PM Doug Hill  > wrote:
> I will echo the sentiments NOT to poke around into view hierarchies which 
> aren’t public parts of the interface. It might work now but you will lose in 
> the long run when Apple changes something, which they will.
> 
> I suggest looking into using Appearance proxies. You can change just about 
> any style/appearance of UI controls, either app-wide or when controls are 
> contained in a specific view controller. I’ve done this for many UIKit 
> views/controllers with great results, particularly when there isn’t a public 
> interface to modify their style.
> 
> Doug Hill
> 
> 
> > On Dec 15, 2015, at 10:43 AM, David Duncan  > > wrote:
> >
> >>
> >> On Dec 15, 2015, at 10:23 AM, Wojciech Czekalski  >>  >> >> wrote:
> >>
> >> I dont recommend it either but it is possible to do it this way. It 
> >> requires extensive testing etc. If done properly however won't crash your 
> >> app if anything but will silently fail.
> >
> > What I’m saying is that UIKit won’t guarantee that this won’t someday crash 
> > your application. Doing things like this is wholly undefined, do not do 
> > them.
> >
> >>
> >> Wysłane z iPhone'a
> >>
> >> Dnia 15.12.2015 o godz. 18:04 David Duncan  >> > napisał(a):
> >>
> >>>
>  On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski   > wrote:
> 
>  Yes, you can recursively iterate through the alert view's subviews and 
>  check for a UILabel and set the font on it. It's hacky but I don't think 
>  there's another way
> >>>
> >>> Do NOT do things like this. The view hierarchy is considered private and 
> >>> the results of any changes you make are not guaranteed to continue 
> >>> working into the future.
> >>>
> 
>  Wysłane z iPhone'a
> 
>  Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki   > napisał(a):
> 
> > I am hoping to change the font for the buttons in a UIAlertController 
> > (not
> > the color, just the face as the styles give me what I want). It doesn’t
> > appear I can use an attributedString (takes String) - is there any 
> > action I
> > can take to achieve this besides subclassing?
> >
> > Eric
> 

___

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: Custom font for UIAlertAction

2015-12-15 Thread Eric E. Dolecki
So you’re talking about iterating through the subviews to find the
UIButton. Which most feel is not the most prudent way to tackle this. If I
had direct access to buttons, I could just set the font for them and not
bother with appearance proxy.

Either I’ll live with the way the alerts look now and file with Apple for
an enhancement, or just roll up my own alert class that looks exactly how I
want - which shouldn’t be very difficult. In fact, after spending the time
in searching and trying various things I could have probably rolled it all
up and have been on to the next thing.

Eric

On Tue, Dec 15, 2015 at 3:33 PM Doug Hill  wrote:

> What I do is use the Appearance proxies to customize the button, not the
> UIAlertController. For example, use the Appearance proxy to set font of a
> button when contained in a UIAlertController.
>
> Doug Hill
>
>
> On Dec 15, 2015, at 12:09 PM, Eric E. Dolecki  wrote:
>
> It would appear that the UIAlertController (UIAlertAction) does not
> conform to appearance proxies. Here is a list of controls that do (up to
> iOS 8.0)
>
> On Tue, Dec 15, 2015 at 2:09 PM Doug Hill  wrote:
>
>> I will echo the sentiments NOT to poke around into view hierarchies which
>> aren’t public parts of the interface. It might work now but you will lose
>> in the long run when Apple changes something, which they will.
>>
>> I suggest looking into using Appearance proxies. You can change just
>> about any style/appearance of UI controls, either app-wide or when controls
>> are contained in a specific view controller. I’ve done this for many UIKit
>> views/controllers with great results, particularly when there isn’t a
>> public interface to modify their style.
>>
>> Doug Hill
>>
>>
>> > On Dec 15, 2015, at 10:43 AM, David Duncan 
>> wrote:
>> >
>> >>
>> >> On Dec 15, 2015, at 10:23 AM, Wojciech Czekalski > > wrote:
>> >>
>> >> I dont recommend it either but it is possible to do it this way. It
>> requires extensive testing etc. If done properly however won't crash your
>> app if anything but will silently fail.
>> >
>> > What I’m saying is that UIKit won’t guarantee that this won’t someday
>> crash your application. Doing things like this is wholly undefined, do not
>> do them.
>> >
>> >>
>> >> Wysłane z iPhone'a
>> >>
>> >> Dnia 15.12.2015 o godz. 18:04 David Duncan 
>> napisał(a):
>> >>
>> >>>
>>  On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski 
>> wrote:
>> 
>>  Yes, you can recursively iterate through the alert view's subviews
>> and check for a UILabel and set the font on it. It's hacky but I don't
>> think there's another way
>> >>>
>> >>> Do NOT do things like this. The view hierarchy is considered private
>> and the results of any changes you make are not guaranteed to continue
>> working into the future.
>> >>>
>> 
>>  Wysłane z iPhone'a
>> 
>>  Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki 
>> napisał(a):
>> 
>> > I am hoping to change the font for the buttons in a
>> UIAlertController (not
>> > the color, just the face as the styles give me what I want). It
>> doesn’t
>> > appear I can use an attributedString (takes String) - is there any
>> action I
>> > can take to achieve this besides subclassing?
>> >
>> > Eric
>>
>>
>
___

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: Custom font for UIAlertAction

2015-12-15 Thread Doug Hill
Instead of changing a single instance, the appearance proxies change the style 
for all instances of a control. So, calling:

[[UIButton appearance] setTitleColor:newColor]

would change the title color for all buttons in your app. I’m going to leave as 
an exercise to the reader how to change the title font for all buttons. You can 
also make these changes only when the control is contained in a view 
controller. Again, I’ll leave how to do this as an exercise to the reader.

Doug

> On Dec 15, 2015, at 12:37 PM, Eric E. Dolecki  wrote:
> 
> So you’re talking about iterating through the subviews to find the UIButton. 
> Which most feel is not the most prudent way to tackle this. If I had direct 
> access to buttons, I could just set the font for them and not bother with 
> appearance proxy.
> 
> Either I’ll live with the way the alerts look now and file with Apple for an 
> enhancement, or just roll up my own alert class that looks exactly how I want 
> - which shouldn’t be very difficult. In fact, after spending the time in 
> searching and trying various things I could have probably rolled it all up 
> and have been on to the next thing.
> 
> Eric
> 
> On Tue, Dec 15, 2015 at 3:33 PM Doug Hill  > wrote:
> What I do is use the Appearance proxies to customize the button, not the 
> UIAlertController. For example, use the Appearance proxy to set font of a 
> button when contained in a UIAlertController.
> 
> Doug Hill
>  
>> On Dec 15, 2015, at 12:09 PM, Eric E. Dolecki > > wrote:
>> 
>> It would appear that the UIAlertController (UIAlertAction) does not conform 
>> to appearance proxies. Here is a list of controls that do (up to iOS 8.0)
>> 
>> On Tue, Dec 15, 2015 at 2:09 PM Doug Hill > > wrote:
>> I will echo the sentiments NOT to poke around into view hierarchies which 
>> aren’t public parts of the interface. It might work now but you will lose in 
>> the long run when Apple changes something, which they will.
>> 
>> I suggest looking into using Appearance proxies. You can change just about 
>> any style/appearance of UI controls, either app-wide or when controls are 
>> contained in a specific view controller. I’ve done this for many UIKit 
>> views/controllers with great results, particularly when there isn’t a public 
>> interface to modify their style.
>> 
>> Doug Hill
>> 
>> 
>> > On Dec 15, 2015, at 10:43 AM, David Duncan > > > wrote:
>> >
>> >>
>> >> On Dec 15, 2015, at 10:23 AM, Wojciech Czekalski > >> > >> >> wrote:
>> >>
>> >> I dont recommend it either but it is possible to do it this way. It 
>> >> requires extensive testing etc. If done properly however won't crash your 
>> >> app if anything but will silently fail.
>> >
>> > What I’m saying is that UIKit won’t guarantee that this won’t someday 
>> > crash your application. Doing things like this is wholly undefined, do not 
>> > do them.
>> >
>> >>
>> >> Wysłane z iPhone'a
>> >>
>> >> Dnia 15.12.2015 o godz. 18:04 David Duncan > >> > napisał(a):
>> >>
>> >>>
>>  On Dec 15, 2015, at 8:53 AM, Wojciech Czekalski >  > wrote:
>> 
>>  Yes, you can recursively iterate through the alert view's subviews and 
>>  check for a UILabel and set the font on it. It's hacky but I don't 
>>  think there's another way
>> >>>
>> >>> Do NOT do things like this. The view hierarchy is considered private and 
>> >>> the results of any changes you make are not guaranteed to continue 
>> >>> working into the future.
>> >>>
>> 
>>  Wysłane z iPhone'a
>> 
>>  Dnia 15.12.2015 o godz. 15:44 Eric E. Dolecki >  > napisał(a):
>> 
>> > I am hoping to change the font for the buttons in a UIAlertController 
>> > (not
>> > the color, just the face as the styles give me what I want). It doesn’t
>> > appear I can use an attributedString (takes String) - is there any 
>> > action I
>> > can take to achieve this besides subclassing?
>> >
>> > Eric
>> 
> 

___

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

CGContextClipToRects: invalid context 0x0.

2015-12-15 Thread Richard Charles
I am trying to debug the following error.

: CGContextClipToRects: invalid context 0x0. This is a serious error. 
This application, or a library it uses, is using an invalid context and is 
thereby contributing to an overall degradation of system stability and 
reliability. This notice is a courtesy: please fix this problem. It will become 
a fatal error in an upcoming update.

I have added a symbolic breakpoint on CGPostError. The application halts 
completely with Apple’s frameworks. There is not a single stack frame from my 
code except main.

The first few stack frames look like this.

#0  0x7fff8e5686c7 in CGPostError ()
#1  0x7fff8e568798 in handle_invalid_context ()
#2  0x7fff8d5ad2c0 in -[NSView _drawRect:clip:] ()

The first thing I noticed is that there are no debug symbols in Apple’s 
frameworks. It that normal?

If there were debug symbols present I could query the NSView object to see what 
class it is to see how it relates to my code.

How do you debug something with no symbols?

--Richard Charles


___

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

Environment woes executing scripts from my OS X app

2015-12-15 Thread Rick Mann
I'm working on an OS X app that unfortunately has to call a series of bash and 
python scripts for part of the processing it does. I was able to include the 
scripts in my app's bundle, and invoke them there, but the environment is 
different when launched via my app than when launched on the command line. How 
can I best control the environment used when executing external scripts?

-- 
Rick Mann
rm...@latencyzero.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