当我启动浏览器应用时,它会显示地址栏和WKWebView
,但没有加载网址。
由于没有URL,因此视图不应该是可滚动的,但它是。
答案 0 :(得分:0)
您可以在viewdidload中执行以下操作:
from tkinter import *
dynamic_option=[]
val={}
dynamic_key=[]
flag=0;
no=0;
spin=0;
def set_value():
global flag
global dynamic_option
global val
global R1
global R2
global R3
global dynamic_key
d=40
global no
global spin
c=120
val={}
print(flag)
if flag==0:
no=int(text1.get())
for num in range(0,no):
i=num
val[i] = StringVar()
R1="r1"+str(num)
R2="r2"+str(num)
R3="r3"+str(num)
R1 = Radiobutton(myframe, text="Bad", variable=val[i], value="bad")
R1.select()
R1.place(x=330,y=c+20)
R2 = Radiobutton(myframe, text="No Effect", variable=val[i], value="no effect")
R2.place(x=380,y=c+20)
R3 = Radiobutton(myframe, text="Good", variable=val[i], value="good")
R3.place(x=460,y=c+20)
dynamic_key.append(R1)
dynamic_key.append(R2)
dynamic_key.append(R3)
dynamic_option.append(val[i])
c=c+30
spin=no+1;
flag=1
elif flag==1 :
for num in range(0,spin):
dynamic_key[num].destroy()
dynamic_key[num+1].destroy()
dynamic_key[num+2].destroy()
flag=0
dynamic_option=[]
dynamic_key=[]
print(flag)
set_value()
myframe=Tk()
myframe.geometry("%dx%d" %(700,700))
text1=Spinbox(myframe, width=3,from_=0, to=12)
text1.place(x=270,y=110)
r=Button(myframe,width=10,pady=2,text="input",command=set_value)
r.place(x=330,y=110)
myframe.mainloop()
修改强>
webView.loadRequest(NSURLRequest(URL: NSURL(string: "about:blank")!))
...
@interface ViewController () <WKNavigationDelegate>