исправлено мерцание бургер меню
This commit is contained in:
		
							parent
							
								
									927ac45ec8
								
							
						
					
					
						commit
						d7067db1d6
					
				@ -69,15 +69,15 @@ struct MainView: View {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                // Затемнение и закрытие по тапу
 | 
					                // Затемнение и закрытие по тапу
 | 
				
			||||||
                if isSideMenuPresented {
 | 
					                Color.black
 | 
				
			||||||
                    Color.black.opacity(0.4 * Double(((menuWidth + menuOffset) / menuWidth)))
 | 
					                    .opacity(Double(menuOffset / menuWidth) * 0.4)
 | 
				
			||||||
                        .ignoresSafeArea()
 | 
					                    .ignoresSafeArea()
 | 
				
			||||||
                        .onTapGesture {
 | 
					                    .onTapGesture {
 | 
				
			||||||
                            withAnimation(.easeInOut) {
 | 
					                        withAnimation(.easeInOut) {
 | 
				
			||||||
                                isSideMenuPresented = false
 | 
					                            isSideMenuPresented = false
 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                }
 | 
					                    }
 | 
				
			||||||
 | 
					                    .allowsHitTesting(menuOffset > 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // Боковое меню
 | 
					                // Боковое меню
 | 
				
			||||||
                SideMenuView(isPresented: $isSideMenuPresented)
 | 
					                SideMenuView(isPresented: $isSideMenuPresented)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user