Git Product home page Git Product logo

pkhud's People

Contributors

aaadonai avatar angerman avatar arturgrigor avatar christiansteffens avatar climbatize avatar cody1024d avatar dankimio avatar edisonlsm avatar hebertialmeida avatar isaced avatar johnbushnell avatar joshavant avatar kajensen avatar kmcgill88 avatar krausefx avatar krsakai avatar laurentiuungur avatar maurovc avatar mchan19 avatar pglongo avatar pkluz avatar randomstep avatar rocry avatar shotskydiver avatar tandinhlee avatar thibauddavid avatar tnantoka avatar tualatrix avatar veronique avatar vytick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pkhud's Issues

Cannot compile under Xcode 6.3 beta 3

Hello, it seems like the compiler is complaining about missing the NSCoder parameter in the init method in Xcode's latest beta. Is this something you're planning to fix or do you need a hand with it? All the best!

PKHUD stays in View hierarchy, breaks Rotation

Hi,

i just stumbled upon an issue which looks like it's related to PKHUD.

Having the following scenario:
Application uses UITabBarController, UISplitViewController and several UINavigationController.

Doing fast rotations and popping View Controllers via Back Button of an UINavigationBar at the same time, leads to broken window sizes - but only if a HUD was displayed at some point before.

See the rotation results:
screen_shot_2016-04-23_at_01_01_15
screen_shot_2016-04-23_at_01_05_25

I can see in Reveal that PKHUD stays in the View hierarchy with a hidden PKHUD.Window, long after it's usage:

screenshot 2016-04-23 01 08 21

If I toggle the hidden status in Reveal off and back on, the view is fixed immediately. If I do the same test without any PKHUD shown before, rotation is always fine.

I am not manipulating the View hierarchy on my own, nor changing the RootViewController anywhere. I did a grep on the Pods, except PKHUD non of them is working on the RootViewController (other pods are more data related things, like Alamofire, Realm etc).

Sadly I am currently unable to provide a demo project right now, because it's a quite big and complex App scenario (60k+ LoC).

Any suggestions? My educated guess would be, that manually removing the PKHUD.window() should fix this..

Edit: Just as a side note regarding the additional UIWindow in PKHUD, you are aware of the memory issue it creates with @3 retina screens?

Also note that windows use a lot of RAM, especially on 3x retina screens. Having more than one of them is going to reduce the amount of memory the rest of your application can use before receiving low memory warnings and eventually being killed.
http://stackoverflow.com/a/26706490/844907

This might become critical in scenarios where a database like Realm is used, which uses memory mapping. From their current limitations:

Any single Realm file cannot be larger than the amount of memory your application would be allowed to map in iOS — this changes per device, and depends on how fragmented the memory space is at that point in time (there is a radar open about this issue: rdar://17119975). If you need to store more data, you can map it over multiple Realm files.
https://realm.io/docs/swift/latest/#current-limitations

So, unnecessarily reducing the already limited memory by using an additional UIWindow doesn't sound good.

Probably related to #79 and fixed with it as well (= wait for next version).

As a workaround I am going to destroy the UIWindow PKHUD creates after presentation has finished.

Cheers,
Frederik

Add CocoaPods support

Hi @pkluz,

the project contains a podspec file but the I cannot find the project on CocoaPods. Do you know the reason?

iOS9

NSForwarding: warning: object 0x17404b610 of class 'PKHUD.PKHUD' does not implement methodSignatureForSelector: -- trouble ahead
Unrecognized selector -[PKHUD.PKHUD hideAnimated]

Error encountered in Xcode 6.4

Pods/PKHUD/PKHUD/PKHUDContentView.swift:132:30: Initializer does not override a designated initializer from its superclass

Pods/PKHUD/PKHUD/PKHUDContentView.swift:38:19: Missing argument for parameter 'coder' in call

Pods/PKHUD/PKHUD/PKHUDContentView.swift:73:19: Missing argument for parameter 'coder' in call

Pods/PKHUD/PKHUD/Window.swift:69:39: Missing argument label 'completion:' in call

BlurEffect can't change Alpha

As discussed in this pull request: #5

I'm still receiving an warning:

2014-09-16 14:29:47.912 PKHUD Demo[50313:10503170] <PKHUD.FrameView 0x7fa053e609d0> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

It appears PKHUD is trying to animate the Alpha of the FrameView, while it's a subclass of UIVisualEffectView. The documentation of the VisualEffectView states the following:

Setting the Correct Alpha Value
When using the UIVisualEffectView class, avoid alpha values that are less than 1.
Creating views that are partially transparent causes the system to combine the view 
and all the associated subviews during an offscreen render pass. UIVisualEffectView 
objects need to be combined as part of the content they are layered on top of in order
to look correct. Setting the alpha to less than 1 on the visual effect view or any of its 
superviews causes many effects to look incorrect or not show up at all.

So to solve this notification, the alpha fading must be done differently.

Any suggestions?

Cheers,
//Michael

status bar always appear

On views where the status bar is hidden, showing the loader will also
makes the status bar appear and offsets the view behind it. do you know how to prevent it from appearing?

Issue with XCODE 6.2 and Framework installation

First, thanks for a great framework!

I am using Xcode 6.2 and adding this to a Swift-based app project.

I have included the Xcode project from a git clone today as a sub-project in my main project. Then I added in the framework to my project. So far so good.

I can run the app in the simulator.

But when I try to run the app on a real device, I get:

dyld: Library not loaded: @rpath/PKHUD.framework/PKHUD
Referenced from: /private/var/mobile/Containers/Bundle/Application/ED9F903F-610B-4955-AE35-C306FA088868/Jeeves.app/Jeeves
Reason: image not found
(lldb)

Any ideas on the reason for this?

Status bar bug?

Hey!

I'm using PKHUD to present a brief dialog to inform them of a feature, but for some reason when PKHUD displays the hud, the status bar changes from .LightContent to .Default. Anyway to correct this so it stays white?

My current code:

PKHUD.sharedHUD.contentView = PKHUDTextView(text: "Text")
PKHUD.sharedHUD.dimsBackground = false
PKHUD.sharedHUD.show()
PKHUD.sharedHUD.hide(afterDelay: 2.0)

I would appreciate any help!

Running warning

Warning when running:
<PKHUD.FrameView 0x7fe412755080> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

Swift 2 Support

Should be converted to support iOS 9 & Swift 2 & Xcode 7.

Unrecognized selector setInitialVelocity:

Trying to display an error view using the default PKHUDErrorView I got this error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CASpringAnimation setInitialVelocity:]: unrecognized selector sent to instance 0x170621f40'

More especifically -[PKHUDErrorView springyRotationAnimation:] at animation.initialVelocity = 0.5

I'm using cocoa pods and xcode 7.0.1

Bugs in iOS 8

The syntax seems to have changed and the demo is not working

HUD.hide(afterDelay: completion:) doesn't call completion

Tracing through a debug, it seems that the userInfo that contains the completion block is nil after the delay.

The code I used (replacing the demo code):

@IBAction func showTextHUD(sender: AnyObject) {
    HUD.show(.Label("Text."))
    HUD.hide(afterDelay: 2, completion: { (complete) -> Void in
        print("here")
    })
}

<PKHUD.FrameView 0x7faae2eb1950> is being asked to animate its opacity.

Hello,

when ill try to use your Hud i am always getting the following error:

<PKHUD.FrameView 0x7faae2eb1950> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

Ill try to close the Hud if the Server gets a response after a Alamofire POST request.

Is this a bug? Or another problem here?

Thanks in advance.

Unbalanced calls to begin/end appearance transitions

I see that people are getting warnings about animating opacity, but that it appears to be a non-issue. However, I'm also seeing Unbalanced calls to begin/end appearance transitions for <PKHUD.WindowRootViewController: 0x15f819cc0>. My usage is very simple, and I'm not changing view controllers or anything unexpected. Is anyone else seeing this?

HUD.show(.LabeledProgress(title: NSLocalizedString("Please Wait", comment: "HUD title"), subtitle: nil))

and later,

HUD.hide()

Switching a RootViewController while PKHUD is showing causes switching back.

func switchRootViewController(rootViewController: UIViewController, animated: Bool, completion: (() -> Void)?) {
    if let window = UIApplication.sharedApplication().keyWindow {
      if animated {
        UIView.transitionWithView(window, duration: 0.5, options: .TransitionCrossDissolve, animations: {
          let oldState: Bool = UIView.areAnimationsEnabled()
          UIView.setAnimationsEnabled(false)
          window.rootViewController = rootViewController
          UIView.setAnimationsEnabled(oldState)
          }, completion: { (finished: Bool) -> () in
            if (completion != nil) {
              HUD.hide(false)
              completion!()
            }
        })
      } else {
        window.rootViewController = rootViewController
      }
    }
  }

Above is a function that I called to switch a rootViewController.
When my app switches its rootViewController while PKHUD is showing, it switches back to a previous rootViewController as soon as the PKHUD is hidden. Any suggestions to avoid this issue?

Image not found error

I've installed using Cocoapods, and my app written in swift.
Everything works fine in the simulator but when loading on a device, it crashes with the following error.

dyld: Library not loaded: @rpath/PKHUD.framework/PKHUD
  Referenced from: /var/mobile/Containers/Bundle/Application/457898E0-D0D7-4733-AE87-3AA67134785A/forexer.app/forexer
  Reason: image not found

I've tried adding the framework to the 'copy bundle resources' but that doesn't even build.

Any suggestions?

Title on Error or Success

This is a nice extension, but I find it painfully difficult to use.

Not sure how swift works, but I don't want to type sharedHud

I would like it to work more like this https://github.com/relatedcode/ProgressHUD

It should be PKHUD.show("String") then PKHUD.success

And at least give me a chance to put a title in the error for god sakes.

Unexpectedly found nil while unwrapping an optional value

I've found that on the swift-2.0 branch, the PKHUDAssets class causes the fatal error on line 20 when returning an image from the bundle. I'm not sure why, I copied the entire PKHUD folder into my project so I have Images.xcassets and everything. I've checked and the bundle for the PKHUDAssests class is being returned correctly (I think). But for some reason the UIImage is returned as nil..

"for IOS 8": it wont run in IOS 7?

I know it says "for IOS 8" twice, but... will it run in IOS 7?

If the answer is yes: do you recommend using CocoaSeeds?
If the answer is no: do you recommend a similar library?

Raise windowLevel to 500

Right now the code reads:

        windowLevel = UIWindowLevelNormal + 1.0

this forces every other application to use a windowLevel strictly between [0.0,1.0), which seems
unnecessarily restrictive. Alert is at 2000.0 and StatusBar is at 1000.0.

I can't install the framework? Import error: "No such module PKHUD"

Hi,

the framework looks so awesome.
But I have problems to use it:

I downloaded the newest .zip from 04/12/2014.
Unzip the files.
Drag & Drop the folder "PKHUD" to my existing swift xcode project.
Then I go to my "AppDelegate.swift" and adding on the top, right under the "import UIKIT" a new line:
import PKHUD

The compiler show me an error: "No such module PKHUD".
What do I wrong?

[By the way the standalone Demo-versions works perfect. I think I have just a little problem, to import the PKHUD.]

I'm using the new Xcode 6.1.1 from the Mac App Store, no beta.
And OS X 10.10.1 Yosemite.

Present the HUD over a specific view

I have a tab bar based app. When I want to present the progress HUD I only want to block the interaction with the VC in which the user is performing an operation. I want to block the interaction with that VC, but not with the tab bar.

I would like to be able to specify the view/vc to present the HUD on top of.

Thanks

iOS 8 error in latest version

When switching to deployment target 8.0 i get error:
Module file's minimum deployment target is ios9.0 v9.0: PKHUD.framework/Modules/PKHUD.swiftmodule/x86_64.swiftmodule

Any suggesting to work both in 8 & 9?

Thanks in advance

Determinate progress bar

It appears that the progress view options are indeterminate progress views - a spinner that provides no indication of when the task is meant to be completed. Do you expect to add any additional determinate progress options, like those in existing Objective-C implementations of progress displays like MBProgressHUD?

iOS 7 compatibilty

Hello,
I would like to use your awesome code for my app but I want it to be compatible with iOS 7. Is it possible ?
Thank you very much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.