self.window.userInteractionEnabled = NO; 这样可以让整个屏幕停止响应

本文深入探讨了Objective-C与Swift两种编程语言在iOS开发领域的应用,包括它们各自的优势、特点以及如何在实际项目中进行选择与使用。

self.window.userInteractionEnabled =NO;     这样就可以让整个屏幕停止响应了啊


NSTimeInterval time = [[NSDate date] timeIntervalSince1970]; 可以这样定义 
NSLog(@"当前时间为%f", time);  打印出从1970年开始到现在的秒数. 

可见time可以赋值给float类型 
所以可以这样写: 
float a = time; 

这样就可以很容易的到两个时间点中间相差多少秒。

def generatevideo(self): """生成视频""" self.videowindow = tk.Toplevel(self.mainwindow) self.videowindow.transient(self.mainwindow) self.videowindow.title("生成视频") self.videowindow.geometry("300x300+400+200") self.viewbtn.config(state='disabled') self.videowindow.bind("<Destroy>", self.videoclose) # 时间选择 tk.Button( self.videowindow, width=15, text='开始时间', command=lambda: self.getdate2('start') ).place(x=20, y=10) tk.Button( self.videowindow, width=15, text='结束时间', command=lambda: self.getdate2('end') ).place(x=20, y=50) self.start_str = tk.StringVar() ttk.Entry( self.videowindow, textvariable=self.start_str, state='readonly' ).place(x=140, y=13) self.end_str = tk.StringVar() ttk.Entry( self.videowindow, textvariable=self.end_str, state='readonly' ).place(x=140, y=53) # 间隔时间 tk.Label(self.videowindow, width=15, text='间隔时间').place(x=20, y=90) values_h = [f"{i:02d}" for i in range(25)] values_m = [f"{i:02d}" for i in range(60)] self.deltahours = ttk.Combobox( master=self.videowindow, height=15, width=3, state="normal", font=("", 11), values=values_h ) self.deltahours.place(x=140, y=90) self.deltahours.current(1) ttk.Label(self.videowindow, text="时").place(x=190, y=90, width=20, height=20) self.deltaminutes = ttk.Combobox( master=self.videowindow, height=15, width=3, state="normal", font=("", 11), values=values_m ) self.deltaminutes.place(x=220, y=90) self.deltaminutes.current(0) ttk.Label(self.videowindow, text="分").place(x=270, y=90, width=20, height=20) # 帧率设置 tk.Label(self.videowindow, width=15, text='帧率设置').place(x=20, y=125) values_rate = [0.5, 1, 2, 5, 10, 20, 50, 100] self.deltarate = ttk.Combobox( master=self.videowindow, height=15, width=3, state="normal", font=("", 11), values=values_rate ) self.deltarate.place(x=160, y=125) self.deltarate.current(1) ttk.Label(self.videowindow, text="张/每秒").place(x=220, y=125, width=60, height=20) # 拍摄类型选择 tk.Label(self.videowindow, width=15, text='拍摄类型选择').place(x=20, y=160) self.transvideo_types = ttk.Combobox( self.videowindow, values=list(self.value_maps_figtype.keys()), width=12, state='readonly', justify="center" ) self.transvideo_types.set('') self.transvideo_types.place(x=160, y=160) self.transvideo_types.bind("<<ComboboxSelected>>", self.on_option_selected_figtype_video) # 位点选择 tk.Label(self.videowindow, width=15, text='点位选择').place(x=20, y=195) self.transvideo_points = ttk.Combobox( self.videowindow, state='readonly', justify="center", width=12 ) self.transvideo_points.place(x=160, y=195) self.transvideo_points.bind("<<ComboboxSelected>>", self.on_option_selected_point_video) # 操作按钮 tk.Button( self.videowindow, width=15, text='开始生成', height=3, font=("", 11), command=self.generate ).place(x=20, y=225) tk.Button( self.videowindow, width=15, text='查看视频', height=3, font=("", 11), command=self.videothreading ).place(x=160, y=225) 详细注释上述代码
最新发布
11-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值