小编ABM*_*ABM的帖子

如何在当前UITableViewController上添加UIView

我很难在UITableViewController的viewDidLoad方法中添加子视图(UIView)

这有效:

[self.view addSubview:self.progView];
Run Code Online (Sandbox Code Playgroud)

但是你可以通过UIView progView看到表格单元格出血.

我尝试过这种方法:

[self.view.superview insertSubview:self.progView aboveSubview:self.view];
Run Code Online (Sandbox Code Playgroud)

这是尝试将progView,UIView添加到当前视图上方的superview.当我尝试这个时,UIView永远不会出现.

- 更新 -

以下是最新的尝试:

UIView *myProgView = (UIView *)self.progView; //progView is a method that returns a UIView

[self.tableView insertSubview:myProgView aboveSubview:self.tableView]; 
[self.tableView bringSubviewToFront:myProgView];
Run Code Online (Sandbox Code Playgroud)

结果与[self.view addSubview:self.progView]相同; UIView出现但似乎在桌子后面.

iphone objective-c ios4

56
推荐指数
10
解决办法
8万
查看次数

React Native 项目未在使用 Apple M1 芯片的 iOS 模拟器上运行

我对 React Native 并不陌生,已经研究这个问题有一段时间了,但我现在面临的问题几乎是新的。我厌倦了这个问题。我面临的问题是,我无法在 iOS 模拟器上运行该应用程序。我几乎尝试了所有方法来解决这个问题,但都无法解决。

我的考验:

  1. 删除Pods然后Podfile.lockpod install然后react-native run-ios
  2. 删除node_modules然后package-lock.json然后PodsPodfile.lock然后做npm install-> pod install->react-native run-ios
  3. 打开 Xcode,清理 Build,然后react-native run-ios
  4. 运行react-native start --reset-cache然后react-native run-ios
  5. pod update然后react-native run-ios

它仍然失败,并且在控制台上抛出了很多错误。我对这种情况感到困惑和恐惧。直到早上一切都工作正常,但现在什么都不起作用了

我得到的错误:

I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsi -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsinspector -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-perflogger -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/Yoga -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/glog -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/boost-for-react-native -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/React-Core -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources-normal/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources -F/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation …
Run Code Online (Sandbox Code Playgroud)

xcode build-error ios react-native-ios apple-m1

1
推荐指数
1
解决办法
7539
查看次数