Hi Jan, Ray;

Great to see this topic making its way onto this list.  I'm also an XCode 
Developer though not a prolific one.  Jan I'm most interested to see how you do 
this programmatically.  I've been looking for resources for a long time.  I've 
found some for older versions of IOS which, with some adaptation work well.  
Afraid I can't find those links now though.  Jan I don't suppose we could tempt 
you to write up a simple step-by-step to get a button, with a label and an 
action into a project programmatically?

Cheers,

Dónal
On 10 Oct 2013, at 08:22, "Jan Blüher, visorApps" <[email protected]> 
wrote:

> Hi Ray,
> 
> you want to connect an Ui element that you defined in Interface Builder to 
> your code, right? You may try to add the following line of code to your 
> ViewController.h file:
> 
> @property (nonatomic, strong) IBOutlet UIButton *button;
> 
> where button is the name of your UIButton element. Depending on how you 
> defined button in IB, there could be some variation in this line. So it might 
> be a bit tricky to establish the connection by hand.I am not sure, wether 
> there is a documentation about this mixed approach, since normally the 
> developer would use the drag and drop method to do it.
> 
> As already mentioned, I do completely skip IB and write all neccessary things 
> directly in code. For this button example, I would declare it in 
> ViewController.h like this:
> 
> @property (nonatomic, strong) UIButton *button;
> 
> In ViewController.m I would declare a method for the button action:
> 
> - (void) buttonAction:(id)sender {
>    // some interesting code here
> }
> 
> Finally, one would create the button element either in the loadView: or 
> viewDidLoad: method in ViewController.m:
> 
> // initialized the button:
> self.button = [UIButton buttonWithType:UIButtonTypeSystem];
> // define the action method:
> [self.button addTarget:self target:@selector(buttonAction:) 
> forControlEvent:UIControlEventTouchUpInside];
> // set a button dimension:
> self.button.frame = CGRectMake(10, 10, 88, 44);
> // set a button title:
> [self.button setTitle:@"Button 1" forControlState:UIControlStateNormal];
> // add the button to your view hierarchy:
> [self.view addSubview:self.button];
> 
> You may take a look at the references of
> * UIViewController
> * UIview
> * UIControl
> * UIButton
> and some others on the iOS developer library for more details. Once you got 
> the hang of it, you are much faster than clicking around in IB and Apple's 
> documentation will provide you all information you need. Regrettably, most of 
> the introduction documents on the Apple Developer Portal rely on Interface 
> Builder, since this would be the preferred method for a sighted developer. So 
> far, I haven't found a really nice introduction for a VO user. If there is 
> someone out there knowing about, please let me know. There are some books 
> around for this purpose. I can recommend the iPhone cook book of Erica Sadun, 
> which is available on iBooks. However, it will cost a bit of money.
> 
> I hope this will help you a bit.
> 
> Greetings
> 
> Jan
> 
> ---
> MouseKick - The mice are coming!
> Download on the App Store:
> http://AppStore.com/MouseKick
> ---
> Dr. Jan Blüher
> visorApps - Accessible apps for iPad & iPhone
> Bayreuther Str. 2
> D-01187 Dresden
> Germany
> 
> phone: +49 (0) 351 16053907
> mobile: +49 (0) 176 34926242
> e-mail: [email protected]
> web: http://visorApps.com
> Twitter: http://www.twitter.com/#visorApps
> Facebook: http://www.facebook.com/VisorApps
> 
> tax number: DE281706766
> 
> 
> 
> Am 09.10.2013 um 20:39 schrieb Ray Campbell <[email protected]>:
> 
>> Thanks, Jan. i really like working with xcode. Where can I find some 
>> documentation on how to connect controls to references in code 
>> programatically?
>> 
>> 
>> Ray Campbell
>> Sent from my iPhone
>> 
>> On Oct 9, 2013, at 1:10 PM, "Jan Blüher, visorApps" 
>> <[email protected]> wrote:
>> 
>>> Hi Travis and list,
>>> 
>>> I do use Xcode with VO for iOS development every day and really like it. 
>>> 95% or something like that can be done without sighted assistence. The 
>>> remaining 5% have do do with the very correct arrangement of images on the 
>>> screen.
>>> 
>>> Although Interface Builder is quite accessible, I do not use it a lot, 
>>> since I am faster with the programmatic approach. There might be other 
>>> issues in Mac development that I am not aware of, but I cannot imagine them.
>>> 
>>> I really do encourage all people to use Xcode. It is quite hard work at the 
>>> beginning, since it is a complex tool. However, once you got used to it, it 
>>> is really fun.
>>> 
>>> Greetings
>>> 
>>> Jan
>>> 
>>> ---
>>> MouseKick - The mice are coming!
>>> Download on the App Store:
>>> http://AppStore.com/MouseKick
>>> ---
>>> Dr. Jan Blüher
>>> visorApps - Accessible apps for iPad & iPhone
>>> Bayreuther Str. 2
>>> D-01187 Dresden
>>> Germany
>>> 
>>> phone: +49 (0) 351 16053907
>>> mobile: +49 (0) 176 34926242
>>> e-mail: [email protected]
>>> web: http://visorApps.com
>>> Twitter: http://www.twitter.com/#visorApps
>>> Facebook: http://www.facebook.com/VisorApps
>>> 
>>> tax number: DE281706766
>>> 
>>> 
>> <--- Mac Access At Mac Access Dot Net --->
>> 
>> To reply to this post, please address your message to 
>> [email protected]
>> 
>> You can find an archive of all messages posted    to the Mac-Access forum at 
>> either the list's own dedicated web archive:
>> <http://mail.tft-bbs.co.uk/pipermail/mac-access/index.html>
>> or at the public Mail Archive:
>> <http://www.mail-archive.com/[email protected]/>.
>> Subscribe to the list's RSS feed from:
>> <http://www.mail-archive.com/[email protected]/maillist.xml>
>> 
>> As the Mac Access Dot Net administrators, we do our very best to ensure that 
>> the Mac-Access E-Mal list remains malware, spyware, Trojan, virus and 
>> worm-free.  However, this should in no way replace your own security 
>> strategy.  We assume neither liability nor responsibility should something 
>> unpredictable happen.
>> 
>> Please remember to update your membership preferences periodically by 
>> visiting the list website at:
>> <http://mail.tft-bbs.co.uk/mailman/listinfo/mac-access/options/>
>> 
> 
> <--- Mac Access At Mac Access Dot Net --->
> 
> To reply to this post, please address your message to 
> [email protected]
> 
> You can find an archive of all messages posted    to the Mac-Access forum at 
> either the list's own dedicated web archive:
> <http://mail.tft-bbs.co.uk/pipermail/mac-access/index.html>
> or at the public Mail Archive:
> <http://www.mail-archive.com/[email protected]/>.
> Subscribe to the list's RSS feed from:
> <http://www.mail-archive.com/[email protected]/maillist.xml>
> 
> As the Mac Access Dot Net administrators, we do our very best to ensure that 
> the Mac-Access E-Mal list remains malware, spyware, Trojan, virus and 
> worm-free.  However, this should in no way replace your own security 
> strategy.  We assume neither liability nor responsibility should something 
> unpredictable happen.
> 
> Please remember to update your membership preferences periodically by 
> visiting the list website at:
> <http://mail.tft-bbs.co.uk/mailman/listinfo/mac-access/options/>

Dr. Dónal Fitzpatrick,
School of Computing, 
Dublin City University,
Glasnevin, 
Dublin 9, Ireland
Tel. +353-(0)1-700-8929
fax: +353-(0)1-700-5442
email: dfitzpat (at) computing.dcu.ie

Email Disclaimer
"This e-mail and any files transmitted with it are confidential and are 
intended solely for use by the addressee. Any unauthorised dissemination, 
distribution or copying of this message and any attachments is strictly 
prohibited. If you have received this e-mail in error, please notify the sender 
and delete the message. Any views or opinions presented in this e-mail may 
solely be the views of the author and cannot be relied upon as being those of 
Dublin City University. E-mail communications such as this cannot be guaranteed 
to be virus-free, timely, secure or error-free and Dublin City University does 
not accept liability for any such matters or their consequences. Please 
consider the environment before printing this e-mail."




<--- Mac Access At Mac Access Dot Net --->

To reply to this post, please address your message to [email protected]

You can find an archive of all messages posted    to the Mac-Access forum at 
either the list's own dedicated web archive:
<http://mail.tft-bbs.co.uk/pipermail/mac-access/index.html>
or at the public Mail Archive:
<http://www.mail-archive.com/[email protected]/>.
Subscribe to the list's RSS feed from:
<http://www.mail-archive.com/[email protected]/maillist.xml>

As the Mac Access Dot Net administrators, we do our very best to ensure that 
the Mac-Access E-Mal list remains malware, spyware, Trojan, virus and 
worm-free.  However, this should in no way replace your own security strategy.  
We assume neither liability nor responsibility should something unpredictable 
happen.

Please remember to update your membership preferences periodically by visiting 
the list website at:
<http://mail.tft-bbs.co.uk/mailman/listinfo/mac-access/options/>

Reply via email to