Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8419531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:38:23+00:00 2026-06-10T02:38:23+00:00

I am coding in the latest xcode in Objective-C and I have been pretty

  • 0

I am coding in the latest xcode in Objective-C and I have been pretty much stuck last two days.
I am making an application that will allow the users to select what color clothing they are wearing. So for example, if I am wearing a black and white shirt, I can choose clothing = shirt and colours = black and white.

Here is a screen shot of how my app looks like: (everything you see here are UIButtons so you can click them and for colours, I have it set up so the colours you have chosen will highlight)

![my app]: https://i.stack.imgur.com/pBFud.png “myApp”

so in the first image, you would choose your clothing and once you hit the button, the second view will come up and in here, you would choose the colours.
So far so good. But I run into some problems when I want to use the colours chosen to bring back to the first view. If I picked black and white for the colours of my shirt, I want my app to bring back that data and change the “shirt” button’s background colour to change to black and white to indicate to the users those are the colours you have chosen. ‘

Here are my codes so far.

changeClothes.h (first view): http://pastebin.com/xPMNAnCY

changeClothes.m: http://pastebin.com/MdjMPK6r

chooseColors.h (second view): http://pastebin.com/Zb4aXvzV

chooseColors.m: http://pastebin.com/RHTxfwW5

Any help would be appreciated.

Many, many, many thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:38:25+00:00Added an answer on June 10, 2026 at 2:38 am

    You could work with the delegation pattern!
    Define a protocol for your chooseColors class and make the changeClothes class implement this protocol. changeClothes class then works as a delegate of chooseColors class. In chooseColors class, when a color is selected via button, call the delegate with this event! Back in changeClothes class you can dismiss the modal chooseColors controller and perform some actions in changeClothes controller according to the selected color.

    More on the delegation pattern: Cocoa Core Competencies
    (On the bottom you have a reference to a example project from apple)

    Also please take a look at the coding guidelines for cocoa!
    You named your classes wrongly, see: Coding Guidelines for Cocoa

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With the latest releases of XCode that contain static analyzers, some of my objects
I have been coding in java for a while now .... i want to
The latest Xcode builds while coding... It gets stuff wrong and slows my Mac
I'm relatively new to java (specifically swing) and have recently been making some fairly
I have a welcome page (JSP file) for my application that contains some dynamic
I'm coding a tag search in CakePHP (latest release) but the solution I have
I traditionally work in VB.NET, but have been asked to code the latest project
I've been doing my coding with Xcode 3.2.3 I've recently upgraded my iPad OS
After coding and testing a Java application (lets say with Eclipse, but not necessarily)
My background has been generally new technology demonstrators, which, well... demonstrate the latest technology

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.