andreamazz / AMScrollingNavbar

Scrollable UINavigationBar that follows the scrolling of a UIScrollView
MIT License
6.05k stars 634 forks source link

Can install AmscrollingNavbar on Swift 4 #281

Closed atistank closed 7 years ago

atistank commented 7 years ago

hi my project currently coding in Swift 4, when i try install on cocoapods it still install AmscrollingNavbar ver 3.0.2 and I've got an error: no such module AMScrollingNavbar ?

how i can fix it ? thanks

alejouribesanchez commented 7 years ago

@atistank Show me your pod file maybe I can help you

atistank commented 7 years ago

# platform :ios, '9.0'

target 'Project1_Duy' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Project1_Duy
pod 'AMScrollingNavbar'

  target 'Project1_DuyTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'Project1_DuyUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end```

thanks in advance
alejouribesanchez commented 7 years ago

Change this line pod 'AMScrollingNavbar' to pod 'AMScrollingNavbar', '~> 4.0.4' in your terminal in the folder of your project run: pod repo update then run: pod install

Also in the pods target select AMScrollingNavBar and then change Swift language to 4.0 screen shot 2017-10-22 at 2 04 51 am screen shot 2017-10-22 at 2 04 15 am

atistank commented 7 years ago

it not working for me :(

Analyzing dependencies [!] Unable to satisfy the following requirements:

None of your spec sources contain a spec satisfying the dependency: AMScrollingNavbar (~> 4.0.4).

You have either:

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.

alejouribesanchez commented 7 years ago

run in your terminal: $ [sudo] gem install cocoapods then run: $ pod repo update then again: $ pod install

alejouribesanchez commented 7 years ago

I tried in my computer and it's working good the problem is not AMScrollingNavbar the problem is your pod file and cocoa pods command.

alejouribesanchez commented 7 years ago

@atistank if your project is in objective c you can test with this: https://github.com/alejouribesanchez/ScrollHideNavigationController

andreamazz commented 7 years ago

@atistank run

rm -rf ~/.cocoapods/repos/master
pod setup

To be sure also delete your Podfile.lock then run pod install again.

In any case, this is not an issue of this repo.

atistank commented 7 years ago

thanks for you support. it worked :D