Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2010, 07:17 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 5
Justsomedesigner is on a distinguished road
Unhappy --??//Randomize 2 labels as ONE\\??-------help!

Hi ,
I know how to randomize text with the press of a button , and im using the
arc4random function for that. What i want though is with the press of a button
the label1text appears and with the next press label2text appears .
With the next press label1text appears again with a new random sentence and so on.

!//The most important and tricky part I need 2 achieve is that label2text needs to be the answer of label1text ; which explains the title of my thread\\!

Please help me on this one ! I posted a similar thread like this before but didnt get a reply. If what im asking is not possible please tell me so i know !
Justsomedesigner is offline   Reply With Quote
Old 11-17-2010, 08:56 AM   #2 (permalink)
Registered Member
 
finefin's Avatar
 
Join Date: Jun 2009
Posts: 259
finefin is on a distinguished road
Default

easy! use a BOOL value:
Code:
.h
BOOL fillLabel1;

.m
-(IBAction) fillLabels {
   if (fillLabel1) {
     label1.text = question;
     fillLabel1 = NO;
   } else {
     label1.text = answer;
     fillLabel1 = YES;
   }
}
__________________

I help you, you buy my app - you help me, I buy your app

PARALLAX, The Book Of Sayings - chopped up edition! (HD),omicron,
Canupa Band deluxe (universal), Canupa Band FREE!, Your Face --- follow me on twitter
finefin is offline   Reply With Quote
Reply

Bookmarks

Tags
label, random

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 374
7 members and 367 guests
apatsufas, Kirkout, lzwasyc, MarkC, Sami Gh, SamorodovAlex, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:44 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0