Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2017, 06:56:01 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Newbie Corner
| | |-+ Newbie here just saying hello.
Pages: [1] Go Down
Author Topic: Newbie here just saying hello. (Read 3357 times)
Posts: 8


on: October 11, 2015, 06:09:47 PM

This is my first post here and just saying hello! I started in Objective-C (for the second time) a few weeks ago. I am in chapter 5. Fourth edition. It is a great book so far.
Posts: 8


Reply #1 on: October 31, 2015, 10:43:56 PM

Hello blur, welcome! lol was just responding to myself since no one else has said hello. Maybe I am saying hello in the wrong place... well, anywho...

I have an array question. I am almost finished with my very first iPhone app written in... you guessed it... Objective-C...

I am from a php, javascript background. I am used to making arrays indexed by key value,

$array = array(
    'fruit1' => 'apple',
    'fruit2' => 'orange',
    'fruit3' => 'grape',
    'fruit4' => 'apple',
    'fruit5' => 'apple');

// this cycle echoes all associative array
// key where value equals "apple"
while ($fruit_name = current($array)) {
    if ($fruit_name == 'apple') {
        echo key($array).'
my question, Is there a way to do something similar in objective-C

The array I would like to build would be something like
array[0] = -411; // negative value
array[1] = -410;
array[2] = -409;
array[3] = -408;
Thanks in advance for any and all help

Last Edit: October 31, 2015, 10:46:04 PM by blur Logged
Posts: 8


Reply #2 on: August 24, 2016, 11:13:48 AM

Okay I have made leaps and bounds more progress with Objective-C and iOS programming. I have figuired this out myself. I use two NSArrays with the same number of elements. Then access the array index of the other NSArray [objectAtIndex]. It works geat.
Pages: [1] Go Up
Jump to:

Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.