Skip to content

AreejAlharbi - #23

Open
Areejalharbi57 wants to merge 1 commit into
Tuwaiq-iOS-ContentTeam-2021:mainfrom
Areejalharbi57:main
Open

AreejAlharbi#23
Areejalharbi57 wants to merge 1 commit into
Tuwaiq-iOS-ContentTeam-2021:mainfrom
Areejalharbi57:main

Conversation

@Areejalharbi57

Copy link
Copy Markdown

No description provided.

@Almatrafi-A Almatrafi-A left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

احسنتي يا اريج على هذا الجهد والابداع في الكود وفي الواجهة المرتبة


override func viewDidLoad() {

QLable.text = "جرب سؤال"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

حاول ما تكتبين الاكواد هنا بشكل مباشر ولكن عرفي دالة واستدعيها هنا


}
@objc func questionfunction(){
QLable.text = Qestions.first

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

اللوجك وهذا الاسلوب يعرض الاسئلة متسلسلة ولكن بالاخير ما راح يسوي اعادة للاسئلة
ممكن تكتبين الكود بهذا الشكل:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    if currentQuestionIndex == questions.count {
        currentQuestionIndex = 0
    }
    currentQuestionIndex += 1

    let question: String = questions[currentQuestionIndex]
    questionLabel.text = question
    answerLabel.text = "???"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants