johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

Hello, do you still support dynamic debugging of storyboard (without compiling) and opening the color version? I downloaded it from appstore #287

Closed zuqiu123 closed 3 years ago

zuqiu123 commented 4 years ago

Hello, do you still support dynamic debugging of storyboard (without compiling) and opening the color version? I downloaded it from appstore

d

Does the appstrore version also support two features?

johnno1962 commented 4 years ago

Hi, you’re looking at the old repo from the look of things. The App in the App Store InjectionIII supports limited injection of Storyboards if you build them while the App is running and connected. It should reload the currently displayed view controller. Note: you don’t save the storyboard but build your app instead. "Tunable Parameters" is no longer supported.

zuqiu123 commented 4 years ago

I can understand that every time I change Storyboards, I have to use command + B before he will take effect. Is it true that the real-time display is not supported without compiling? Is this correct?

johnno1962 commented 4 years ago

That’s right, you need to build storyboards to have them inject.

zuqiu123 commented 4 years ago

Thank you, thank you for your work, great.

zuqiu123 commented 4 years ago

Hello, I am having a problem with debugging. How do I change the collview delegate method?

I don't know how to pass in parameters

Can you help me, thank you

johnno1962 commented 4 years ago

Hi, I’m afraid I can only answer questions related directly to InjectionIII the App Store app.

zuqiu123 commented 4 years ago

Great God, can you post a new tutorial video on YouTube?

johnno1962 commented 4 years ago

You asked a question about code not related to InjectionIII. How am I supposed to know what your collection view delegate arguments should be! Perhaps you could store them somewhere.

zuqiu123 commented 4 years ago

Hello idol,If I want to modify viewDidLoad, I call the registration method and write it in the registration method, because viewDidLoad has no parameters, so I call it and I can modify the code in viewDidLoad dynamically.

@objc func injected() {
     viewDidLoad()
}

But some code is in dalegate. I want to dynamically modify the code in these methods, such as setting the color of the cell.

  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell:FaceCellCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: cell_ID, for: indexPath) as! FaceCellCollectionViewCell
        cell.backgroundColor = .white
        return cell
 }

I don’t know how to write in injected to change color to red

@objc func injected () {
// i don't know how to write
}

I look forward to your answer