Re: MapKit location authorization

2014-09-19 Thread John Tsombakos
You also need to add items to your Info.plist file:

NSLocationAlwaysUsageDescription

and/or

NSLocationWhenInUseUsageDescription

On Sep 19, 2014, at 2:01 PM, Gerriet M. Denkmann  wrote:

> 
> So I put it into viewDidLoad of the view controller for the MapView.
> 
> But:
> 
> authorizationStatus = kCLAuthorizationStatusNotDetermined
> locationServicesEnabled = YES
> 
> so I do (as recommended):
> [ self.locationManager requestWhenInUseAuthorization ];
> 
> Now I would expect a panel to come up, asking the user "Do you want to allow 
> this app to use Location Services?"
> But nothing is seen (iOS 8.0).
> 
> And when I ask the manager for a location, I just get nil.
> 
> Later on I get: locationManager:didChangeAuthorizationStatus: 
> kCLAuthorizationStatusNotDetermined
> 
> and: "Trying to start MapKit location updates without prompting for location 
> authorization."
> 
> Not very useful.
> 
> 
> Kind regards,
> 
> Gerriet.

___

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: Yet more new information. Was: Re: Weird UITableView problem

2015-04-30 Thread John Tsombakos
My two cents.. I just tried this on a MacPro, 10.10.3 and Xcode 6 (6.3.1) and 
no matter which device I run in the simulator and scale factor, i can see all 
the items in the list. If looking at the iPad Air, thye all fit on the screen 
without scrolling. Smaller devices I have to scroll the table view.


> On Apr 30, 2015, at 10:44 AM, William Squires  wrote:
> 
> Okay, I've now tried this on Xcode 5 and 6, and on 10.8.5 and 10.10.3. Here's 
> my synopsis:
> 
> * Happens only with UITableView
> * Happens on simulator if set for any device (except iPad?) that has retina 
> display
> * Does not happen if set for a non-retina device.
> * Unknown if this happens on real devices (retina or not).
> * Happens regardless of the scale factor of the simulator display if the Mac 
> does not have a retina display. Unkonwn what happens if your Mac does have a 
> retina display (I don't have one.)
> * Happens with Swift or ObjC project
> * If set for iPad Air, all the rows are "available", plus about 3 to 4 blank 
> ones - this happens regardless of the scale factor (by "available", meaning 
> you can see them, or scroll down to see them.) If the scale factor is set to 
> see all the simulator screen, then the (simulated) UITableView has no 
> scroller and you can see all 20 of the rows, plus 3 blank ones (the rows are 
> there, but have no cell.textLabel.text)
> 
> This is a fairly easy project to duplicate. Just create a "Single View" iOS 
> project with target iOS 7+, for Universal, and either ObjC or Swift. Add a 
> UITableView to the main view, set your view controller to implement 
> UITableViewDelegate and UITableViewDataSource. Connect the outlets to the 
> view controller in IB. Set up some "content" (an array of 20 or so items), 
> and feed it to the UITableView via tableView:numberOfRowsInSection: and 
> tableView:cellForRowAtIndexPath: then set your target device to iPad air, and 
> then again to some iPhone (say, 5s, or 6) that has a retina display.
> 
> If possible, I'd like someone to try this on an actual iPhone, as well as to 
> try it on the simulator on an iMac that does have a retina display.
> 
> 
> On Apr 28, 2015, at 11:45 AM, William Squires  wrote:
> 
>> Thinking this was a Swift problem, I recreated the project, but with ObjC as 
>> the language. I set up the UI the same as with the Swift project. It too, 
>> only shows a subset of the array, only this one shows 15 rows, not 13. 
>> Here's the ViewController.m
>> 
>> //
>> //  ViewController.m
>> //  SimpleObjCTable
>> //
>> //  Created by William Squires on 4/28/15.
>> //  Copyright (c) 2015 William Squires. All rights reserved.
>> //
>> 
>> #import "ViewController.h"
>> 
>> @interface ViewController ()
>> 
>> @property NSArray *dwarves;
>> 
>> @end
>> 
>> @implementation ViewController
>> 
>> - (void)viewDidLoad
>> {
>> [super viewDidLoad];
>> self.dwarves = [NSArray arrayWithObjects:@"Sleepy",
>>   @"Sneezy",
>>   @"Bashful",
>>   @"Happy",
>>   @"Doc",
>>   @"Grumpy",
>>   @"Dopey",
>>   @"Thorin",
>>   @"Dorin",
>>   @"Nori",
>>   @"Ori",
>>   @"Balin",
>>   @"Dwalin",
>>   @"Fili",
>>   @"Kili",
>>   @"Oin", // These are not shown.
>>   @"Gloin",
>>   @"Bifur",
>>   @"Bofur",
>>   @"Bombur",
>>   nil];
>> 
>> // Do any additional setup after loading the view, typically from a nib.
>> }
>> 
>> - (void)didReceiveMemoryWarning
>> {
>> [super didReceiveMemoryWarning];
>> 
>> // Dispose of any resources that can be recreated.
>> }
>> 
>> #pragma mark "UITableView Methods"
>> 
>> -(NSInteger)tableView:(UITableView *)tableView 
>> numberOfRowsInSection:(NSInteger)section
>> {
>> NSInteger theCount = [self.dwarves count];
>> 
>> NSLog(@"theCount = %ld", theCount);
>> return theCount;
>> }
>> 
>> -(UITableViewCell *)tableView:(UITableView *)tableView 
>> cellForRowAtIndexPath:(NSIndexPath *)indexPath
>> {
>> NSLog(@"indexPath.row = %ld", indexPath.row);
>> UITableViewCell *cell = [tableView 
>> dequeueReusableCellWithIdentifier:@"SimpleTableIdentifier"];
>> if (cell == nil)
>> {
>> cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
>> reuseIdentifier:@"SimpleTableIdentifier"];
>> }
>> cell.textLabel.text = [self.dwarves objectAtIndex:indexPath.row];
>> return cell;
>> }
>> 
>> @end
>> 
>> running it gives me (in the debug console) 4 instances of "theCount = 20", 
>> followed by 15 lines of "inde

Re: Swift 2.0

2015-07-02 Thread John Tsombakos
There’s this:

The Swift Programming Language (Swift 2 Prerelease)

https://itunes.apple.com/us/book/swift-programming-language/id1002622538?mt=11 



> On Jul 2, 2015, at 12:59 PM, William Squires  wrote:
> 
> There is (or was) a PDF you could get in the Bookstore.app direct from Apple 
> vis-a-vis the original Swift (1.0). Has this document been updated (for Swift 
> 2.0) or even a new "changes to Swift" document, or are we waiting for the 
> "official" release of Xcode 7, and/or a new OS X 10.11 or some such?
> ___
> 
> 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/johnt519%40gmail.com
> 
> This email sent to johnt...@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

Retain/Release and Properties clarification

2011-10-03 Thread John Tsombakos
Hello,
I have a question about release/retain and properties. Now I get the
whole "if you allocate it, you have to release
it", but with properties I need some clarification. I'm using an
AVAudioPlayer to play a sound, and I'm initializing
it in the viewDidLoad by calling a routine to get the sound. Some sample code:

In my view controller .h file :
@interface AudioPlayerViewController : UIViewController {
AVAudioPlayer *audioPlayer;
}
@property (retain) AVAudioPlayer *audioPlayer;

In the .m file:
@synthesize audioPlayer;
in viewDidLoad:
audioPlayer = [self getSoundFile:"soundfile.wav"];
...

in getSoundFile routine:
AVAudioPlayer *snd;
...
snd = [[[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]
autorelease];
...
return snd;

Now (I did copy the code from a sample, that had the autorelease in
it) if I try to play the
sound, it crashes. If I remove the autorelease it's fine. I just want
to understand what's going on.
I know using the (retain) in the property declaration will use retains
when setting the property. Assuming
the autorelease is not there, in my getSoundFile routine, the
alloc/init would return a retained object
(correct?) Then in my viewDidLoad routine when I get the sound, does
the assignment do another retain?
Should I keep the autorelease and assign it with:
   audioPlayer = [[self getSoundFile:"soundfile.wav"] retain];

(side note... should that be self.audioPlayer = ... ? I keep getting
confused with accessors vs. ivars too ;) )

I hope that made sense :)  Thanks for any input / hints.
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Retain/Release and Properties clarification

2011-10-03 Thread John Tsombakos
On Mon, Oct 3, 2011 at 10:29 AM, Steve Sisak  wrote:
>> At 10:14 AM -0400 10/3/11, John Tsombakos wrote:
>> @interface AudioPlayerViewController : UIViewController {
>> AVAudioPlayer *audioPlayer;
>> }
>> @property (retain) AVAudioPlayer *audioPlayer;
>>
>> In the .m file:
>> @synthesize audioPlayer;
>> in viewDidLoad:
>> audioPlayer = [self getSoundFile:"soundfile.wav"];
>
> You got close with:
>
>> (side note... should that be self.audioPlayer = ... ? I keep getting
>> confused with accessors vs. ivars too ;) )
>
> You do, indeed want:
>
> self.audioPlayer = [self getSoundFile:"soundfile.wav"];
>
> or
>
> [self setAudioPlayer = [self getSoundFile:"soundfile.wav"]];
>
> Without the self. you're bypassing the setter (which is responsible for
> retain/release) and just setting the instance variable directly. Therefore
> there's no retain.

Yeah, as I was typing out the message, I had the realization that I
should probably be using the self. and that was most likely the cause
of my problems. I couldn't try it, because my system is at home ;) I
will give it a try later (and will also change to use the underscore
ivar names too - I had done that previously, but...well, didn't this
time.)

Funny how you think you got the concepts all sorted out, and I get it,
really, but when actually typing some code, it all gets confusing ;)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Retain/Release and Properties clarification

2011-10-03 Thread John Tsombakos
On Mon, Oct 3, 2011 at 2:01 PM, Andreas Mayer  wrote:
>
> Am 03.10.2011 um 16:14 schrieb John Tsombakos:
>
>> audioPlayer = [self getSoundFile:"soundfile.wav"];
>> ...
>>
>> in getSoundFile routine:
>> AVAudioPlayer *snd;
>> ...
>> snd = [[[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]
>
> The question was already answered, but I wanted to point out that the method 
> (not 'routine') name is misleading.
>
> a) In Cocoa the get prefix is used when values are returned indirectly by 
> pointer.
>   Ex. - (void)getRed:(CGFloat *)red green:(CGFloat *)green blue:(CGFloat 
> *)blue alpha:(CGFloat *)alpha
> b) You don't return a sound file, you return an audio player.
>
> So I would recommend to name the method something like -audioPlayerWithFile: 
> or -audioPlayerNamed:
>
> Naming conventions are important in Cocoa. Following them makes your code 
> much more readable.

Yeah, this was typed in the email, so I just typed something to show
that I had a method that returned the audio player. That's what I get
for being quick :)

Thanks, though..
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


iOS UI Design Question / Opinions wanted

2011-07-13 Thread John Tsombakos
Hi,

Just getting more into iOS development, and am deciding on what to do for an
app. One app is a "competition scoring" application, where the judges would
use the app to calculate and score a game. The scores would are derived from
a series of "challenges", each worth a set number of points.

Each challenge score is determined by a Yes/No completion - Did XYZ happen?
Did The other thing happen? etc. I was trying to figure out how to design
the UI and while for a web version that we already have that uses radio
buttons for each question, I'm not sure what would be best for an iOS app. I
looked at the UISwitch, but it shows "On/Off" and that's not quite right. A
segmented control could possibly work, with one for Yes and one for No. I
thought a checkbox to signify "Yes" - but it doesn't look like iOS has
checkboxes (how did I never notice that!).

I want to make it simple, so popping up a separate alert/window would incur
an extra step.

So I'm soliciting opinions / suggestions.

Thanks,

John T.
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: iOS UI Design Question / Opinions wanted

2011-07-14 Thread John Tsombakos
On Thu, Jul 14, 2011 at 1:25 AM, Roland King  wrote:

> Custom button with your own graphic tick/cross is probably what I'd use for
> this. That's easy to do and fits pretty well with the ios look and feel.
> Either have two buttons  and use them as radio buttons (unselect one when
> you hit the other) or if perhaps try one button which switches states each
> time you hit it. If that had a graphic with a large tick and small cross for
> the "yes" state and the opposite for the "no" state it would be quite
> obvious that you need to hit it to toggle.
>
> Hm.. Yeah, that sounds like a good idea, that seems like it would work.

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: iOS UI Design Question / Opinions wanted

2011-07-14 Thread John Tsombakos
On Thu, Jul 14, 2011 at 8:14 AM, Thomas Davie  wrote:

>
> Along with various other people, I have a custom UISwitch that does exactly
> what you require, it's available here http://whataboutapp.co.uk/
>
> Tom Davie


That looks exactly what I would want! 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: iOS UI Design Question / Opinions wanted

2011-07-14 Thread John Tsombakos
On Thu, Jul 14, 2011 at 9:26 AM, John Tsombakos  wrote:

> On Thu, Jul 14, 2011 at 8:14 AM, Thomas Davie  wrote:
>
>>
>> Along with various other people, I have a custom UISwitch that does
>> exactly what you require, it's available here http://whataboutapp.co.uk/
>>
>> Tom Davie
>
>
> That looks exactly what I would want! Thanks!
>

Hm. Checking it out, looks promising. However, is there a way to put the
control into a view in Interface Builder? Or do you have to do it in code
(alloc/initWithFrame)? There isn't any docs included with the library.

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Migrating to iPhone 5 screen size

2012-10-05 Thread John Tsombakos
On Fri, Oct 5, 2012 at 12:20 PM, Matt Neuburg  wrote:
> Neat idea! It appears also that in Xcode 4.5.1 (and 4.5?) you are handed the 
> necessary launch images as part of a new project. m.
>

I've found also when opening an existing project in 4.5, Xcode will
generate a warning saying you don't have the proper image for the 4"
screen. Double click the warning and Xcode will offer to create a new,
blank (black) image for you.
___

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: This board is slow. Was: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()

2012-11-05 Thread John Tsombakos
On Mon, Nov 5, 2012 at 1:16 PM, Jerry Krinock  wrote:

> Lately I've been seeing other people respond to messages on these boards,
> apparently out of order.  I have seen messages appear on 
> cocaobuilder.com*hours* before they appear in my email.  I may also have seen 
> it happen
> vice versa once.
>
> I think maybe we need to check cocoabuilder.com before replying to any
> message.
>
> P.S.  If Apple would shut down this board so everyone would use the new
> dev forums instead, that would be fine with me!  There are advantages and
> disadvantages to that format, and it wouldn't be the first time that Apple
> forced the world to change :))  I continue here because there still seems
> to be more eyeballs.
>

As long as the "new dev forums" are available to us who don't have a paid
Apple Developer account (yet!) And looking at cocoabuilder.com right now,
I'm only seeing one topic listed for today - it seems quite behind the
email on this list to me.
___

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