問題タブ [uitoolbaritem]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
581 参照

ios - UIToolBar フレームに滑らかなロー シャドウを追加し、UIToolBarItems 間に行セパレーターを追加する方法

UIToolBar を image-1 のように作成しようとしていますが、操作の出力は image-2 として発生しました。UIToolBar のシャドウ レイヤーとその Items 間のセパレーターを追加するにはどうすればよいですか?

セパレーターについてこの質問を見つけましたが、そこには答えがありません-> UIToolbarのツールバー項目間のセパレーター

画像-1

画像-2

0 投票する
1 に答える
271 参照

ios - UIToolbarItems と UIBarButtonItems がシミュレーターに表示されないか、途切れます。何か不足していますか?

WKWebViewプログラムでいくつかの を作成しましたUIBarButtonItems。右上に「開く」ボタンUIToolbarItems、下部にProgressView、flexibleSpace、およびリロード ボタンの 3 つ。私のシミュレーターはこれらを画面にロードできず、シミュレーターに正しくロードされていないようです。

さまざまな画面サイズを試しましたが、UIBarButtonItems と UIToolbarItems がシミュレーターに表示されるようには見えません。

私のiphoneXRシミュレーターは現在どのように見えるか

0 投票する
1 に答える
89 参照

ios - How to disable Tool bar item from a different view controller in Xcode

So I created a multi view app that uses a toolbar item that allows the user to navigate through the app. This toolbar item is used in all three of the views I have for the application. The main problem I am facing is that I want the user to no longer be able to tap the toolbar item when he opens the second view to allow the view to show all its contents (Since I am gradually showing labels). I just want to know if I am able to disable the toolbar item from the controller of the second view.

The toolbar item is linked to the ViewController.m. And I want to be able to disable it from the PCRViewController.m controller.

Note that I have already tried creating a method in the ViewController.m and calling it in the second controller, I have also tried to use the following line of code in the PCRViewController.m self.navigationItem.rightBarButtonItem.enabled = NO; but both did not do the job.

Here's an image of how I have the toolbar placedToolbar picture

If there's anything else you need me to provide please tell me so I can fix this problem. Thank you for your help!

PS: I used the following method to switch from one view to another:

Below is the code of the switchViewFromViewController:toViewController method I have used: