Fill different UITextField with the same personalised keyboardProblem with personalised Keyboard with UIPickerViewSet the maximum character length of a UITextFieldHow can I make a UITextField move up when the keyboard is present - on starting to edit?iPhone UITextField - Change placeholder text colorText inset for UITextField?Set padding for UITextField with UITextBorderStyleNoneiOS - Dismiss keyboard when touching outside of UITextFieldUITextField text change eventProgrammatically change UITextField Keyboard typeHow do I check when a UITextField changes?Problem with personalised Keyboard with UIPickerView

Strategy to pay off revolving debt while building reserve savings fund?

Company looks for long-term employees, but I know I won't be interested in staying long

Redirect if userid is not found in a database table

Do dragons smell of lilacs?

Amira L'Akum not on Shabbat

May I use a railway velocipede on used British railways?

Why did my "seldom" get corrected?

Term “console” in game consoles

Arithmetics in LuaLaTeX

How do you send money when you're not sure it's not a scam?

Why is Google approaching my VPS machine?

Random piece of plastic

I have found a mistake on someone's code published online: what is the protocol?

Necroskitter and creatures dying because of placing -1/-1 counters

What causes a rotating object to rotate forever without external force—inertia, or something else?

Finding all possible pairs of square numbers in an array

When can a polynomial be written as a polynomial function of another polynomial?

Desecrating Shabbos to ask a Gadol to daven for a patient?

Zhora asks Deckard: "Are you for real?". Was this meant to be significant?

Software need db owner permission to master database (sql2016)

Is Error correction and detection can be done with out adding extra bits?

Why were these characters absent in Spider-Man: Far From Home?

Difference between Pure EdDSA (ed25519) and HashEdDSA (ed25519ph)

Why do space operations use "nominal" to mean "working correctly"?



Fill different UITextField with the same personalised keyboard


Problem with personalised Keyboard with UIPickerViewSet the maximum character length of a UITextFieldHow can I make a UITextField move up when the keyboard is present - on starting to edit?iPhone UITextField - Change placeholder text colorText inset for UITextField?Set padding for UITextField with UITextBorderStyleNoneiOS - Dismiss keyboard when touching outside of UITextFieldUITextField text change eventProgrammatically change UITextField Keyboard typeHow do I check when a UITextField changes?Problem with personalised Keyboard with UIPickerView






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I've got a view where I've different UITextfield. To fil this TF I use a personalised UIPickerview as keyboard.



My problem is, when I select the First TF the keyboard open and I can select my value. The value go to this selected TF. Now when I select the second TF the keyboard appears but the value goes to the first TF ...



I don't know why this not works ...



In my ViewDidLoad T've got :



flightTimeSe.inputAccessoryView = Ttoolbar
flightTimeSe.delegate = self
flightTimeMe.inputView = DurationPicker
flightTimeMe.inputAccessoryView = Ttoolbar
flightTimeMe.delegate = self
flightTimeMp.inputView = DurationPicker


This assign the UIPickerviewto the TF and Also my toolbar.



My UIPickerview is defined as follow :



lazy var DurationPicker: UIPickerView = 
let DurationPicker = UIPickerView()
DurationPicker.delegate = self
DurationPicker.dataSource = self

var flightTime: String = ""
var row0: String = "0"
var row1: String = "0"
var row2: String = "0"
var row4: String = "0"
var row5: String = "0"

row0 = myPickerRow1[DurationPicker.selectedRow(inComponent: 0)]

row1 = myPickerRow2[DurationPicker.selectedRow(inComponent: 1)]

row2 = myPickerRow3[DurationPicker.selectedRow(inComponent: 2)]

row4 = myPickerRow5[DurationPicker.selectedRow(inComponent: 4)]

row5 = myPickerRow6[DurationPicker.selectedRow(inComponent: 5)]

//print("(row0)(row1)(row2):(row4)(row5)")

if row0 != "0"
flightTime = "(row0)(row1)(row2):(row4)(row5)"
else if row0 == "0" && row1 != "0"
flightTime = "(row1)(row2):(row4)(row5)"
else if row1 == "0" && row2 != "0"
flightTime = "(row2):(row4)(row5)"
else if row2 == "0" && row4 != "0"
flightTime = "(row2):(row4)(row5)"
else if row2 == "0" && row4 == "0" && row5 != "0"
flightTime = "(row2):(row4)(row5)"

print(flightTime)
return DurationPicker
()


I don't now how to deal with my delegate to fill the right TF...



Thanks for your help !










share|improve this question




























    0















    I've got a view where I've different UITextfield. To fil this TF I use a personalised UIPickerview as keyboard.



    My problem is, when I select the First TF the keyboard open and I can select my value. The value go to this selected TF. Now when I select the second TF the keyboard appears but the value goes to the first TF ...



    I don't know why this not works ...



    In my ViewDidLoad T've got :



    flightTimeSe.inputAccessoryView = Ttoolbar
    flightTimeSe.delegate = self
    flightTimeMe.inputView = DurationPicker
    flightTimeMe.inputAccessoryView = Ttoolbar
    flightTimeMe.delegate = self
    flightTimeMp.inputView = DurationPicker


    This assign the UIPickerviewto the TF and Also my toolbar.



    My UIPickerview is defined as follow :



    lazy var DurationPicker: UIPickerView = 
    let DurationPicker = UIPickerView()
    DurationPicker.delegate = self
    DurationPicker.dataSource = self

    var flightTime: String = ""
    var row0: String = "0"
    var row1: String = "0"
    var row2: String = "0"
    var row4: String = "0"
    var row5: String = "0"

    row0 = myPickerRow1[DurationPicker.selectedRow(inComponent: 0)]

    row1 = myPickerRow2[DurationPicker.selectedRow(inComponent: 1)]

    row2 = myPickerRow3[DurationPicker.selectedRow(inComponent: 2)]

    row4 = myPickerRow5[DurationPicker.selectedRow(inComponent: 4)]

    row5 = myPickerRow6[DurationPicker.selectedRow(inComponent: 5)]

    //print("(row0)(row1)(row2):(row4)(row5)")

    if row0 != "0"
    flightTime = "(row0)(row1)(row2):(row4)(row5)"
    else if row0 == "0" && row1 != "0"
    flightTime = "(row1)(row2):(row4)(row5)"
    else if row1 == "0" && row2 != "0"
    flightTime = "(row2):(row4)(row5)"
    else if row2 == "0" && row4 != "0"
    flightTime = "(row2):(row4)(row5)"
    else if row2 == "0" && row4 == "0" && row5 != "0"
    flightTime = "(row2):(row4)(row5)"

    print(flightTime)
    return DurationPicker
    ()


    I don't now how to deal with my delegate to fill the right TF...



    Thanks for your help !










    share|improve this question
























      0












      0








      0








      I've got a view where I've different UITextfield. To fil this TF I use a personalised UIPickerview as keyboard.



      My problem is, when I select the First TF the keyboard open and I can select my value. The value go to this selected TF. Now when I select the second TF the keyboard appears but the value goes to the first TF ...



      I don't know why this not works ...



      In my ViewDidLoad T've got :



      flightTimeSe.inputAccessoryView = Ttoolbar
      flightTimeSe.delegate = self
      flightTimeMe.inputView = DurationPicker
      flightTimeMe.inputAccessoryView = Ttoolbar
      flightTimeMe.delegate = self
      flightTimeMp.inputView = DurationPicker


      This assign the UIPickerviewto the TF and Also my toolbar.



      My UIPickerview is defined as follow :



      lazy var DurationPicker: UIPickerView = 
      let DurationPicker = UIPickerView()
      DurationPicker.delegate = self
      DurationPicker.dataSource = self

      var flightTime: String = ""
      var row0: String = "0"
      var row1: String = "0"
      var row2: String = "0"
      var row4: String = "0"
      var row5: String = "0"

      row0 = myPickerRow1[DurationPicker.selectedRow(inComponent: 0)]

      row1 = myPickerRow2[DurationPicker.selectedRow(inComponent: 1)]

      row2 = myPickerRow3[DurationPicker.selectedRow(inComponent: 2)]

      row4 = myPickerRow5[DurationPicker.selectedRow(inComponent: 4)]

      row5 = myPickerRow6[DurationPicker.selectedRow(inComponent: 5)]

      //print("(row0)(row1)(row2):(row4)(row5)")

      if row0 != "0"
      flightTime = "(row0)(row1)(row2):(row4)(row5)"
      else if row0 == "0" && row1 != "0"
      flightTime = "(row1)(row2):(row4)(row5)"
      else if row1 == "0" && row2 != "0"
      flightTime = "(row2):(row4)(row5)"
      else if row2 == "0" && row4 != "0"
      flightTime = "(row2):(row4)(row5)"
      else if row2 == "0" && row4 == "0" && row5 != "0"
      flightTime = "(row2):(row4)(row5)"

      print(flightTime)
      return DurationPicker
      ()


      I don't now how to deal with my delegate to fill the right TF...



      Thanks for your help !










      share|improve this question














      I've got a view where I've different UITextfield. To fil this TF I use a personalised UIPickerview as keyboard.



      My problem is, when I select the First TF the keyboard open and I can select my value. The value go to this selected TF. Now when I select the second TF the keyboard appears but the value goes to the first TF ...



      I don't know why this not works ...



      In my ViewDidLoad T've got :



      flightTimeSe.inputAccessoryView = Ttoolbar
      flightTimeSe.delegate = self
      flightTimeMe.inputView = DurationPicker
      flightTimeMe.inputAccessoryView = Ttoolbar
      flightTimeMe.delegate = self
      flightTimeMp.inputView = DurationPicker


      This assign the UIPickerviewto the TF and Also my toolbar.



      My UIPickerview is defined as follow :



      lazy var DurationPicker: UIPickerView = 
      let DurationPicker = UIPickerView()
      DurationPicker.delegate = self
      DurationPicker.dataSource = self

      var flightTime: String = ""
      var row0: String = "0"
      var row1: String = "0"
      var row2: String = "0"
      var row4: String = "0"
      var row5: String = "0"

      row0 = myPickerRow1[DurationPicker.selectedRow(inComponent: 0)]

      row1 = myPickerRow2[DurationPicker.selectedRow(inComponent: 1)]

      row2 = myPickerRow3[DurationPicker.selectedRow(inComponent: 2)]

      row4 = myPickerRow5[DurationPicker.selectedRow(inComponent: 4)]

      row5 = myPickerRow6[DurationPicker.selectedRow(inComponent: 5)]

      //print("(row0)(row1)(row2):(row4)(row5)")

      if row0 != "0"
      flightTime = "(row0)(row1)(row2):(row4)(row5)"
      else if row0 == "0" && row1 != "0"
      flightTime = "(row1)(row2):(row4)(row5)"
      else if row1 == "0" && row2 != "0"
      flightTime = "(row2):(row4)(row5)"
      else if row2 == "0" && row4 != "0"
      flightTime = "(row2):(row4)(row5)"
      else if row2 == "0" && row4 == "0" && row5 != "0"
      flightTime = "(row2):(row4)(row5)"

      print(flightTime)
      return DurationPicker
      ()


      I don't now how to deal with my delegate to fill the right TF...



      Thanks for your help !







      swift delegates uitextfield






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 9:47









      flyer74flyer74

      718 bronze badges




      718 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Better approach is create a function which takes textfield and tag, creates UIPickerView object and set as input view of textfield, while creating you can assign tag to UIPickerView, in delegate you can read tag of date picker and update textfield accordingly.






          share|improve this answer























          • I'm trying since 1 week but nothing goes right ...

            – flyer74
            Apr 2 at 16:08











          • Are you setting tags for each picker view?

            – Abhishek
            Apr 3 at 12:16










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354059%2ffill-different-uitextfield-with-the-same-personalised-keyboard%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Better approach is create a function which takes textfield and tag, creates UIPickerView object and set as input view of textfield, while creating you can assign tag to UIPickerView, in delegate you can read tag of date picker and update textfield accordingly.






          share|improve this answer























          • I'm trying since 1 week but nothing goes right ...

            – flyer74
            Apr 2 at 16:08











          • Are you setting tags for each picker view?

            – Abhishek
            Apr 3 at 12:16















          0














          Better approach is create a function which takes textfield and tag, creates UIPickerView object and set as input view of textfield, while creating you can assign tag to UIPickerView, in delegate you can read tag of date picker and update textfield accordingly.






          share|improve this answer























          • I'm trying since 1 week but nothing goes right ...

            – flyer74
            Apr 2 at 16:08











          • Are you setting tags for each picker view?

            – Abhishek
            Apr 3 at 12:16













          0












          0








          0







          Better approach is create a function which takes textfield and tag, creates UIPickerView object and set as input view of textfield, while creating you can assign tag to UIPickerView, in delegate you can read tag of date picker and update textfield accordingly.






          share|improve this answer













          Better approach is create a function which takes textfield and tag, creates UIPickerView object and set as input view of textfield, while creating you can assign tag to UIPickerView, in delegate you can read tag of date picker and update textfield accordingly.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 at 9:56









          AbhishekAbhishek

          9752 gold badges12 silver badges25 bronze badges




          9752 gold badges12 silver badges25 bronze badges












          • I'm trying since 1 week but nothing goes right ...

            – flyer74
            Apr 2 at 16:08











          • Are you setting tags for each picker view?

            – Abhishek
            Apr 3 at 12:16

















          • I'm trying since 1 week but nothing goes right ...

            – flyer74
            Apr 2 at 16:08











          • Are you setting tags for each picker view?

            – Abhishek
            Apr 3 at 12:16
















          I'm trying since 1 week but nothing goes right ...

          – flyer74
          Apr 2 at 16:08





          I'm trying since 1 week but nothing goes right ...

          – flyer74
          Apr 2 at 16:08













          Are you setting tags for each picker view?

          – Abhishek
          Apr 3 at 12:16





          Are you setting tags for each picker view?

          – Abhishek
          Apr 3 at 12:16








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354059%2ffill-different-uitextfield-with-the-same-personalised-keyboard%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해