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 8197081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:40:07+00:00 2026-06-07T05:40:07+00:00

I want make some quizes about movie. There is quiz mutable array with 10

  • 0

I want make some quizes about movie.

There is quiz mutable array with 10 objects.
Using core data..entity is movie.
attributes are title, actor and correctcount.

There are two textfields,

Titlefield and actorfield.

I want to make two quizes from one object

First quiz which titlefield is hidden,
Second quiz which actorfield is hidden.

and user can type the movie title or actor name.
in textfields.

And if user type correct thing, i want to +1 correct count.

What i did is..

i put the quiz mutable array into these two arrays

Array A (quiz 1 to 10) <<for title quiz
Array B (same as array A) <<for actor quiz

And Movie *quizMovie

And..
after suffle these two arrays
Set enumerators to use nextObject method.

NSEnumerator *enu1 = [arrayA objectEnumerator];
NSEnumerator *enu2 = [arrayB objectEnumerator];

Set number =1 <

And UIButton to set quiz and start the quiz

If( number%2==1)
quizMovie = [enu1 nextObject]
Titlefield.hidden = YES;
else
quizMovie = [enu2 nextObject]
Actorfield.hidden = YES;

And when user tap the done button,
If correct, i want to +1 correctcount.

With these codes.. I can’t get what i want…

Complecate..

Help me, Geniuses!!

  • 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-07T05:40:09+00:00Added an answer on June 7, 2026 at 5:40 am

    Combine, then use a sorting method:

    NSArray *combinedArray = [arrayA arrayByAddingObjectsFromArray:arrayB];
    NSSortDescriptor *ascInts = [NSSortDescriptor sortDescriptorWithKey:@"self" ascending:YES];
    NSArray *sortDescriptors = [NSArray arrayWithObject:ascInts];
    combinedArray = [combinedArray sortedArrayUsingDescriptors:sortDescriptors];
    

    This is assuming the members are instances of NSNumber.

    edit
    This method selects from one array if the press is odd, a different if it’s even, as I think you desire based on our conversations.

    static int pressNumber = 0;
    pressNumber++;
    NSArray *sourceArray;
    if(pressNumber%2) { // if it's an odd-numbered press
      sourceArray = arrayA;
    } else {
      sourceArray = arrayB;
    }
    int indexToSelect = (int) (floor(pressNumber/2.0))+1;
    if(indexToSelect >= sourceArray.count) {
      // out-of-bounds
      pressNumber = 0;
      indexToSelect = 1;
    }
    selecteObject = [sourceArray objectAtIndex:indexToSelect];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Django, I want to make some data available for download. My jQuery call
I want to make some C++ program and I'm using function popen here to
I want to make some changes to the data on my production Django server,
I want to make some actions just before my application close. I see there
I want to make some file operation using Javascript or jQuery like: File create
Hi All I want to make some animation using c#.Animation should include water falling
i want to make a question about developing using #ifdef directive. I want do
I am using twisted and now i want to make some pretty ui using
I want to make some product to offer key-value data system. but local memory
I want to make some data available between some activities, just like a shopping

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.